Created
December 8, 2020 22:58
-
-
Save kristijan-pajtasev/f4545c94abdea5f0fd6651fc66317902 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
import UserContext from '../UserContext' | |
import ContextChild from "../ContextChild"; | |
function ContextParent() { | |
const value = {name: "Peter"}; | |
return ( | |
<UserContext.Provider value={value}> | |
<div>context parent</div> | |
<ContextChild/> | |
</UserContext.Provider>) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment