Welcome to my revamped portfolio! As a Full Stack Developer, I’ve refreshed my site to showcase my latest projects and skills more vividly. Dive in to see what’s new and share your thoughts. Your feedback inspires my growth. Let’s explore the possibilities together! 🚀
Visit Here: https://itsproali.vercel.appRedux is a predictable, open-source state container for javascript applications. Redux makes it more accessible to manage states in a big project and makes the application faster than expected.
Well, A large application has many kinds of states, which connect one component to other components. It is very complicated to manage and handle states without using the redux. In redux, a state can be used from any parent or child component.
Let’s introduce the principal workflow of redux.
Action is the very first step of redux. Action is a function, which returns an Object. Most of the time it has two data. These are “type” and “payload”. Type declare what will do the state and payload contain the data which we want to add or manage.
Reducer is the second step of working with redux. Reducer is also a function. The reducer has two arguments, “state” and “action”. A state is nothing other than it takes an initial state. And the action takes the action which we previously created. In the inner reducer function, it returns an order by checking the condition of the type of action.
Store is the global state of an application. It is stored in an Object tree with a single store. A state can be used for any component from the store. To do that App.js should be wrapped with a “Provider” which passes the store.
Dispatch is a way to use the states in our application. There is a hook called “useDispatch” which comes from “React Redux”. We would use this to call for action and forward the state management process.
Thank you so much for taking your time. I hope you have gained a piece of basic knowledge about redux and how it works.