Open
Description
It would be useful to have this added to the library (great job BTW):
preventDefault :: P.ReactProps SyntheticInputEvent -> P.ReactProps SyntheticInputEvent
preventDefault = CP.handleProp $ liftEffect <<< SyntheticEvent.preventDefault
Usage example:
D.form [ SearchFormSubmitted <$ (preventDefault P.onSubmit) ]
[
-- Fields go here.
SearchFormSubmitted <$ D.button [ P.onClick ] [ D.text "Search" ]
]
It's fantastic it wasn't there because I had no other choice but to understand what's under the hood but I think it's an useful addition. That plus an example of using handleProp. Just saying. :)
BTW. I had assumed Prop is a Monad; that threw me off a bit.
Thank you so much; I really enjoy using Concur!
Metadata
Metadata
Assignees
Labels
No labels