Skip to content

Commit b34095f

Browse files
authored
Fix type warning, and export handler_ (#32)
1 parent 0897e02 commit b34095f

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

generated-docs/React/Basic/Events.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ input { onChange: handler targetValue
6969
}
7070
```
7171

72+
#### `handler_`
73+
74+
``` purescript
75+
handler_ :: Eff (react :: ReactFX) Unit -> EventHandler
76+
```
77+
78+
Create an `EventHandler` which discards the `SyntheticEvent`.
79+
80+
For example:
81+
82+
```purs
83+
input { onChange: handler_ (setState \_ -> { value })
84+
}
85+
```
86+
7287
#### `merge`
7388

7489
``` purescript

src/React/Basic/Events.purs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module React.Basic.Events
44
, EventFn
55
, unsafeEventFn
66
, handler
7+
, handler_
78
, merge
89
, class Merge
910
, mergeImpl
@@ -68,7 +69,7 @@ handler (EventFn fn) cb = mkEffFn1 $ fn >>> cb
6869
-- | input { onChange: handler_ (setState \_ -> { value })
6970
-- | }
7071
-- | ```
71-
handler_ :: forall a. Eff (react :: ReactFX) Unit -> EventHandler
72+
handler_ :: Eff (react :: ReactFX) Unit -> EventHandler
7273
handler_ = mkEffFn1 <<< const
7374

7475
class Merge (rl :: RowList) fns a r | rl -> fns, rl a -> r where

0 commit comments

Comments
 (0)