Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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