Skip to content

Instantly share code, notes, and snippets.

@kristijan-pajtasev
Created December 8, 2020 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kristijan-pajtasev/f4545c94abdea5f0fd6651fc66317902 to your computer and use it in GitHub Desktop.
Save kristijan-pajtasev/f4545c94abdea5f0fd6651fc66317902 to your computer and use it in GitHub Desktop.
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