
When an action is dispatched, the Redux store calls the reducer function with the current state and the dispatched action. The reducer function returns a new state, and the store state is updated. This triggers a re-render of the React components, and the data flows through the app.


This is a simple way to create redux folder structure in your react project.

Above this two commend you can easily import redux toolkit as well as react-redux library.
Here you require configureStore file from @reduxjs/toolkit for create your store.


You can see in image where defined a examplereducer function. the Reducer function every time get two parameter state and action.
you can get your data in the data parameter that you initialize in initalstate object.

In Action you dispatch your action and type.
Wrap your application in the Provider component from react-redux and pass the store to it.

By Jignesh Kheni
June 29, 2024
© Copyright 2026 - Beact Infotech. All Rights Reserved