Last active
November 6, 2018 03:18
-
-
Save chentsulin/9c1a4d4b10944b7ed6ddd58eb6f35aee to your computer and use it in GitHub Desktop.
renderProps-Context
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 App = () => { | |
return ( | |
<ThemeContext.Consumer> | |
{theme => ( | |
<LocaleContext.Consumer> | |
{locale => ( | |
<div className={theme}> | |
{locale} | |
</div> | |
)} | |
</LocaleContext> | |
)} | |
</ThemeContext> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment