Member-only story

Simplify State Management with Redux Toolkit

Dr. Vipin Kumar
6 min readSep 26, 2023

State management is a critical aspect of building robust and scalable web applications. Redux has long been a popular choice for handling state in React applications, but it can sometimes be challenging to set up and maintain. This is where Redux Toolkit comes into play. Redux Toolkit is an official package from the Redux team that simplifies the process of configuring Redux and reduces the boilerplate code required. In this blog post,

State Management in React JS

1. Local State Management of React Component:

Every React Component maintain local state, one component cannot modify state of another component, only by passing props we can pass data to another component. You can analysis this by using image given below, in this image TotalCounter component have its on local state using useState, and Counter component can access this state only by passing props, send by TotalCounter component to Counter Component.

Figure 1: Local State in React JS Component

2. Sharing Local State Among Other Components:

In React, we can only share local state to another component by using props, as I explain in image given below, in this image, if we want to share state information of TotalCounter to Counter child component of Component3, then we have to pass TotalCounter state information to Component1, then…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Dr. Vipin Kumar
Dr. Vipin Kumar

Written by Dr. Vipin Kumar

Assoc. Prof. , DCA & Assoc. Head (SD), SDFS, at KIET, PhD (CS) My YouTube Channel: Dr. Vipin Classes (https://www.youtube.com/channel/UC-77P2ONqHrW7h5r6MAqgSQ)

No responses yet

Write a response