Created
June 29, 2017 05:40
-
-
Save my-slab/5f234481de96de8db6414016e68d8722 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { compose, mapProps } from 'recompose'; | |
import someAction from './someAction'; | |
export const Component = ({ handleOnClick }) => ( | |
<button onClick={handleOnClick}>Ayyy lmao</button> | |
); | |
const enhance = compose( | |
mapProps(props => ( | |
{ | |
handleOnClick: someAction, | |
...props, | |
} | |
)), | |
) | |
export default enhance(Component); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment