Last active
February 17, 2019 19:55
-
-
Save mDibyo/cb8d0e94952b460015554baf4172b7cc 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
| function withHooksSupport(Component) { | |
| return class ComponentWithHooksSupport extends Component { | |
| render() { | |
| const withHook = (useHook) => { | |
| return useHook; | |
| } | |
| const WithHook = withHook(() => super.render()); | |
| return <WithHook />; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment