Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

purescript-recompose

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

purescript-recompose

PureScript bindings for acdlite/recompose using purescript-react

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

purescript-recompose

Latest release Latest release recompose channel on discord Build Status

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.

Usage

Install with bower:

	$ bower install --save purescript-recompose

Compose 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.value

In 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

Keywords

FAQs

Package last updated on 30 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc