Last active
September 27, 2019 13:30
-
-
Save davemackintosh/22f6331b505361f2f9bbd8b23ec7f9a8 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
function compose(...composable) { | |
return (component) => | |
composable.reduceRight((children, Composable) => { | |
return <Composable>{children}</Composable> | |
}, component) | |
} | |
// compose(withRouter, withMyHOC, withYourHOC)(MyComponent) | |
export default compose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment