You are on the classic-redux branch. Here the counter logic has been built using a classic Redux approach
It's a very simple counter app that can:
- increment the number by 1;
- decrement the nuber by 1;
- increase the number by 5;
- open and close the counter (the counter number will be returned back to 0 on close)
NOTE: The app was created using 2 different approaches:
- the first uses the classic Redux approach;
- the second approach uses the Redux toolkit (switch to the 'redux-toolkit' branch to view the code).
The main goals for me as a web developer were to improve my skills in working with:
- the classic Redux:
- the createStore() Redux method;
- creating the counter reducer functions;
- the useDispatch() react-redux hook;
- the useSelector() react-redux hook;
- JavaScript switch/case statement
- Clone the project to your machine by running:
git clone https://github.com/SharinLana/react-redux-counter.git
- To install the project dependencies, run:
npm install
- When the installation is complete, run the following command to start the app:
npm start
- To view the code of the alternative approach:
git switch redux-toolkit
- React.js
- Redux (redux and react-redux packages)
- JavaScript
- CSS
- incrementing, decrementing the number of the counter;
- displaying components conditionally;
- responsive design (mobile adaptation);