Created
July 31, 2020 02:43
-
-
Save woodRock/084da6a7a2d0195ee750904dacbe6756 to your computer and use it in GitHub Desktop.
Usage for a React 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
import { useContext } from "./context"; | |
const Example = () => { | |
const [thing] = useContext(); | |
return ( | |
<> | |
{thing} | |
</> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment