DEV Community

Cover image for React-Redux flow
Cathy Diaz
Cathy Diaz

Posted on


React-Redux flow

The react-redux flow, how it flows from getting information from your forms to your store state.

  • On your form, an event handler is triggered.
  • Once that event has been triggered, it is going to dispatch an action to the redux store.

Dispatching an action is the only way to trigger a state change. dispatch(action)

  • The store then, is going to run the reducer function

Reducer function passes in state and action. Then it uses the switch statement to change between cases depending on the dispatch type.

Switch statements render one component at a time when you have multiple components to render.

  • Switching between cases, the state will update accordingly.
  • And finally the UI will re-render with the new updated data

Top comments (0)