Created
May 26, 2018 20:03
-
-
Save 4nte/5293adf408a9b292af644675133583f2 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 { Provider, Consumer } = React.createContext("Scuba Manager"); | |
render() { | |
return ( | |
<Provider value="Scrum Master"> | |
<Consumer> | |
{ (userRole) => <span>Role: {userRole}</span> /* <span>Role: Scrum Master</span>*/} | |
</Consumer> | |
</Provider> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment