Skip to content

React-Redux Counter - Classic Approach (the code is available on the classic-redux branch) & Redux Toolkit Approach (published, see the link below)

Notifications You must be signed in to change notification settings

SharinLana/react-redux-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Counter App (React-Redux.js)

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 goals of creating this application:

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

To start the app on your machine:

  1. Clone the project to your machine by running:
git clone https://github.com/SharinLana/react-redux-counter.git
  1. To install the project dependencies, run:
npm install
  1. When the installation is complete, run the following command to start the app:
npm start
  1. To view the code of the alternative approach:
git switch redux-toolkit

Languages, frameworks, libraries, packages, tools and technologies:

  • React.js
  • Redux (redux and react-redux packages)
  • JavaScript
  • CSS

Functionalities:

  • incrementing, decrementing the number of the counter;
  • displaying components conditionally;
  • responsive design (mobile adaptation);

About

React-Redux Counter - Classic Approach (the code is available on the classic-redux branch) & Redux Toolkit Approach (published, see the link below)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published