#redux #thunk - how to populate various #reducers:  #reactjs #react #javascript
  • So if we have the dispatch function available in the action creator we can use it to dispatch other actions.
  • Redux Thunk middleware allows you to write action creators that return a function instead of an action.
  • The thunk can be used to delay the dispatch of an action, or to dispatch only if a certain condition is met.
  • We get dispatch and getState functions inside the action creator — it could be very useful…
  • Using Redux Thunk to populate other reducers’ states

Read more


burczu

@burczu: “#redux #thunk — how to populate various #reducers: #reactjs #react #javascript” open tweet »