Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import React from 'react';
  2. import { compose, mapProps } from 'recompose';
  3.  
  4. import someAction from './someAction';
  5.  
  6. export const Component = ({ handleOnClick }) => (
  7. <button onClick={handleOnClick}>Ayyy lmao</button>
  8. );
  9.  
  10. const enhance = compose(
  11. mapProps(props => (
  12. {
  13. handleOnClick: someAction,
  14. ...props,
  15. }
  16. )),
  17. )
  18.  
  19. export default enhance(Component);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement