Important function provided by Redux Toolkit
- The createStore function in basic Redux is wrapped by configureStore function which automatically provides with middlewares and enhancers.
- Classic reducer is replaced by createReducer function which makes the code shorter and simpler to understand.
- The createAction() utility that returns an action creator function.
- Redux createSlice() function that comes in handy to replace create action and create Reducer functions with a single function.
- Redux createAsyncThunk() that takes Redux strings as arguments and returns a Promise.
- Redux createEntityAdapter() utility that helps to perform CRUD operations.
Redux Toolkit
Redux Toolkit or RTK is an node package that simplify the development by providing utility functions. It is made to simplify the creation of redux store and provide easy state management. It can be easily installed using simple npm commands.
Before the introduction of the Redux toolkit state management was complex in simple redux.
Contact Us