0
State Management · Global Stores
New technique
What is a global store?
Behold the Great Ledger itself: one book, kept outside any single workbench, that every smith can read.
A global store holds app-wide state outside the component tree. Any component can read the part it needs and send updates: no props, no providers per value.
Components subscribe to just the slice they select, and re-render only when that slice changes. That's the big difference from one large Context.
- Worth it when many distant components read and update the same complex client state.
- The cost: extra concepts and code. Small apps rarely need one.