A simple and practical React context example

Posted on: 31 January 2021
javascript
react
random header of a mountain

I couldn't find a simple enough React context example so I made one. The meat of the example is in UserContext.js, which holds the state and changes it. This state is then used in an inner component, Details.js

CodeSandbox