Last updated
Last updated
declarative, reactive programming
different paradigm then redux/zustand
Instead of selectors, just wrap functional component in observers if it relies on state
Need to pass store down yourself either just directly or useContext
// store.js
// CounterComponent.js
autorun
: Automatically tracks any observable accessed within its function and re-executes when they change.
reaction
: Tracks a specific observable and runs side-effects when it changes.
when
: Executes a function when a specific condition becomes true.