Created
April 8, 2018 02:29
-
-
Save idmontie/0641b982e9ba06f28febde359a0f1ebc to your computer and use it in GitHub Desktop.
This file contains 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
const mousePosition = () => (BaseComponent) => { | |
return class MousePosition extends Component { | |
// ... | |
render() { | |
const { x, y } = this.state; | |
return <BaseComponent {...this.props} x={x} y={y} />; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment