I've created this repo to study and understand how Context API really works. Besides that, I believe it would be a good idea to have this code here ready in case I need to remind myself in the future.
If you are here, reading this, feel free to ask me anything about it here: danielgomesp@gmail.com
You can access a live view of this project right here: https://elastic-joliot-c2f6ed.netlify.com/
This is how it looks like: The function is executed in the Coutner component, while the Mirror can show the state received from the context
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.