1.1.0 • Published 9 years ago
purescript-recompose v1.1.0
purescript-recompose
A PureScript interface to recompose, a “React utility belt for functional components and higher-order components”. Recompose provides a great way to access React’s features in a more functional way, and it defines many useful higher-order components for easy composition.
purescript-recomposeAPI documentation- Original 
recomposeAPI documentation - Example TodoMVC implementation
 
Usage
Install with bower:
	$ bower install --save purescript-recomposeCompose with your existing components:
newTodo :: ReactClass Unit
newTodo = withHandlers handlers $ myComponent
  where handlers = { addTodo }
type HandleAdd props eff =
  { add :: String -> Eff eff Unit | props } ->
  { target :: { value :: String } } ->
  Eff eff Unit
addTodo :: forall props eff. HandleAdd props eff
addTodo props event = props.add event.target.valueIn this example, myComponent is an existing React component. newTodo is the resulting component after wrapping it with recompose’s withHandlers higher-order component.
License
MIT