Store :
Slice: it is nothing but a combination of reducers and actions
Steps :
1). Install the package like react-redux and redux-toolkit
2). Store the store
3). Provide the store to react (app or index component).
Create slice :
Steps:
1). Import the CreateSlice function from reduxjs/toolkit
2). Create an initial values
3). Create a slice with the help of the createSlice function
Syntax :
let Slice_name= createSlice({
// Actions and reducers
} )
The slice contains three props :
1). Slice name
2). Initial values