We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a41fd55 commit 0897e02Copy full SHA for 0897e02
src/React/Basic/Events.purs
@@ -60,6 +60,17 @@ derive newtype instance categoryBuilder :: Category EventFn
60
handler :: forall a. EventFn SyntheticEvent a -> (a -> Eff (react :: ReactFX) Unit) -> EventHandler
61
handler (EventFn fn) cb = mkEffFn1 $ fn >>> cb
62
63
+-- | Create an `EventHandler` which discards the `SyntheticEvent`.
64
+-- |
65
+-- | For example:
66
67
+-- | ```purs
68
+-- | input { onChange: handler_ (setState \_ -> { value })
69
+-- | }
70
+-- | ```
71
+handler_ :: forall a. Eff (react :: ReactFX) Unit -> EventHandler
72
+handler_ = mkEffFn1 <<< const
73
+
74
class Merge (rl :: RowList) fns a r | rl -> fns, rl a -> r where
75
mergeImpl :: RLProxy rl -> Record fns -> EventFn a (Record r)
76
0 commit comments