Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. # Recompose
  2. A recompose stack is something like this:
  3.  
  4. import * as R from "recompose";
  5. const enhance = R.compose(
  6. R.withProps({text: "Click Me"}),
  7. R.withStateHandler({ active: false }, {
  8. onClick: ({ active }) => event => ({
  9. active: !active,
  10. }),
  11. }),
  12. connect(mapStateToProps, mapDispatchToProps) // react-redux
  13. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement