csar

Azustandmiddleware for async reducerscsar stands for "Context-less state with async reducers"
npm
Usage and demo
import { DrawingSurface } from './drawing-surface/drawing-surface'

import './styles.css'

export const App = () => {
return <DrawingSurface />
}

export default App

What is this?
csar is azustandmiddleware that allows you to create a state and manage it with an async reducer. It's pretty much like zustand's redux middleware, except that
  • You can use async function as reducers
  • You can dispatch() inside reducer
What's the use?

The result of the features above is that

  • Async reducers - Network calls can be made in reducers, all business logic can live in one place. No need for multiple plugins to achieve async state updates outside of a component.
  • Dispatch inside reducers - Easy to orchestrate a sequence of actions with another action.