Last active
October 11, 2017 18:16
-
-
Save danny-andrews/8840b7ce96454af4986769b299c10862 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 LuckyNumber = ({ component: Component, componentProps }) => <Component number={Math.random()} {...componentProps} />; | |
const AppBody = ({ message, number }) => <div>{message}: {number}!</div>; | |
const App = ({ message }) => <LuckyNumber componentProps={{ message }} component={AppBody} />; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment