redux-dsm is an easier way to handle async state. v3.0.0 has simplified state graphs. Yay! #reactjs #redux

  • Since I switched to Redux, I handle all of my view state transitions by dispatching action objects, and that requires writing a bunch of boilerplate, such as action types (e.g., ), and action creators (which your view or service layers can call to create actions without forcing you to import…
  • is an object with camelCased keys and strings corresponding to your state transitions.
  • For the above example, it returns: – – will be an object with camelCased keys and function values corresponding to your state transitions.
  • For each transition, an action creator is created which will automatically fill in the correct action type, and pass through to the state.
  • The example fetch state machine will produce the following : – – is a normal Redux reducer function that takes the current state and an action object, and returns the new state.

redux-dsm – Declarative state machines for Redux: Reduce your async-state boilerplate.
Continue reading “redux-dsm is an easier way to handle async state. v3.0.0 has simplified state graphs. Yay! #reactjs #redux”