- Published on
Redux, Redux toolkit in ReactJs
- Authors
- Name
- Minh LK
Redux
- Global state management for React
- Flow: Action creator dispatch an action to reducer -> Reducer will use that data and store to global state (Store).
Redux toolkit
- Provide a boilerplate and simplify common Redux tasks: create Action Creator, Reducer
- Main functions:
- createSlice: create a slice of a global state (Redux store)
- createAsyncThunk:
- Create an async Action Creator
- Provide 3 action types: pending, fulfilled, and rejected