This application demonstrates how to use React Context API hooks.
In this example, we provide 2 contexts. One for changing the theme and one for showing a list of books. You can find them defined in the contexts
folder. You can take the book context
to mean the single source of truth for providing list of books.
- clone this repository
- run
npm install
to get the node modules - and then
npm start
to run the development server
Note that React version used is 16.8, if you find problems installing dependencies with Node 14+, it is advisable to create a new React app and then duplicate the code.