Project

store

A small state manager built on RxJS, with reducers, an observable state stream, dispatch, and effects.

Writing angle

A project note about understanding state managers by following one action through reducer updates, subscriptions, and async effects.

Interactive demo

inline

An action-flow workbench where readers dispatch reducer actions and delayed effect actions, then watch state and logs update inline.

store

RxJS state flow

Dispatch an action, let the reducer or effect handle it, then watch the observable state stream update.

state$

    action$

     

    effect

     
    const store = createStore(todos)
    
    store.registerEffects([sendTodoEffect])
    store.state$.subscribe(render)
    
    store.dispatch({
      type: 'SEND NEW TODO TO SERVER',
      payload: { content: 'Learn @musicq/store' },
    })