Published on

Redux, Redux toolkit in ReactJs

Authors
  • avatar
    Name
    Minh LK
    Twitter

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).
Reduxflows

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
  • DevTools