Redux Setup
Create a dynamic workspace or a E-commerce web application
You need to have those package, just follow the below steps
- Run the command , as shown below
First step :
npm install redux redux-devtools-extension redux-thunk
- This new command prompts for the information about installs the necessary redux packages and other dependencies. This can take a few minutes.
Second step:
create three indivisual js files in your workspace such as : "Action","Reducer","Store"
Action is use for, create a action for indivisual functionality, which wil return the action type, and if action contains the payload,
and also it returns the payload.
Reduce is use for, to creating the action functionality and it is always wait for the action type and the reducer we will import
in the redux-store file.
Store is use for, Store is the middleware of connecting the components to redux. we will import the store in the main layout file(App.jsx),
which will wrap the store in the react-redux provider ( <
Provider store={store}><
/Provider> ).