This is a simple Practice Guide of React-Js useContext Hook, ContextAPI and Spread-operator on a simple e-commerce Application. How the "Add to cart" actually work using these hooks and concepts.
To clone and run this application, you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:
# Clone this repository
$ git clone https://github.com/hafizmp/Context-API-useContext-Guide.git
# Go into the repository
$ cd Context-API-useContext-Guide
# Install dependencies
$ npm install
# Run the app
$ npm start
Note If you're using Linux Bash for Windows, see this guide or use
node
from the command prompt.
- Solution URL: GitHub
- Live Site URL: CodeSandBox