Recommended Free Tools
Georg’s path to building nexus-state starts with a straightforward problem: when multiple React components need the same data, local state creates separate copies, while lifting state up can make prop flow and updates harder to manage as an application grows. His solution develops from a small store with subscribers into a closure-based library, then adds React integration as a separate layer.
Why build a shared store?
Georg came to React from UI/UX design and found that coordinating the same data across components quickly became cumbersome. Separate useState calls do not automatically share updates. Lifting state into a common parent can make it shared, but then the parent must pass values and update functions down through props.
As an Amazon Associate I earn from qualifying purchases.
The design goal was a shared place to read and update data, plus a way to notify only the parts of the interface that care when that data changes. As Georg puts it, “When I set out to write the library, what I wanted above all was to understand how state managers work.”
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Start with state and subscribers
A Flux-style store
The first version follows a publisher-subscriber pattern. A store owns state and exposes two basic operations: getState returns the current value, and subscribe registers a listener. When the store changes, it notifies listeners.
#1 Best Overall
A React hook can bridge that store to a component: it subscribes, keeps a React state value for rendering, and updates that value when the store sends a notification. This separates the underlying shared state from each component’s local rendering mechanism.
Use a dispatcher for known actions
The next iteration adds a dispatcher. Rather than allowing callers to write arbitrary partial state, the store accepts known action types and handles them centrally. Recognized actions change state and trigger subscriber notifications. This makes the set of supported updates more explicit, though it also introduces action registration and a switch-like dispatch path.
Keep Context stable and subscribe to changes
Georg’s concern with putting changing state directly in React Context is that consumers can rerender when the provider’s value changes, including consumers that only need one field. The alternative is to put a stable store interface in Context and let each consumer subscribe to the changing state it needs.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The article demonstrates this integration with useSyncExternalStore. Context provides access to the store; the subscription supplies the changing snapshot. That distinction matters: Context is used to distribute the store, rather than to broadcast every state update as a new context value.
Move ownership into a factory closure
A provider-based experiment exposed a lifetime problem. If state is reassigned from props or recreated while a component renders, it does not reliably persist from one render to the next. Georg first uses a ref to hold it, then moves the responsibility out of the component and into a factory.
In the final core design, a createNexus-style factory closes over the state and subscribers, then returns a stable store API. Creating another store by calling the factory again gives that store its own independent state and listeners. The closure therefore defines the lifetime and isolation boundary without requiring React.
Rank #3
Actions close over store operations
Actions are user-defined functions created with access to the store’s get and set operations. This lets an action read and update state directly, instead of routing every change through a separately registered string action and dispatcher. The trade-off is less centralized action-type routing in exchange for keeping related update logic close to the store factory.
Features address specific coordination needs
Per-key subscriptions
Listeners can be organized by state key. When a key changes, the store can notify the subscribers for that key instead of asking every selector to reevaluate against the whole state. This reduces unnecessary selector work in the larger workloads shown in the article, but keeping key-level subscriber bookkeeping has a cost of its own.
Batching nested actions
The implementation tracks action nesting depth and keys awaiting notification. Several writes made within an action can then be collected into one notification pass, rather than notifying after every individual write.
Rank #4
Update-source metadata and persistence
Updates can carry provenance, such as server or storage. Subscribers and middleware can inspect that context. The persistence feature uses it to distinguish a storage restoration write from an ordinary state update: without that distinction, restoring data could trigger a persistence write back to storage and create an echo.
Middleware and developer tools
Middleware can see the previous state, next state, and update context; the described design also allows middleware to replace or cancel an update and to be removed. A subscription-based Redux DevTools adapter displays the action name, connecting the library’s updates to a familiar debugging view.
Separate the core from React
The core store is designed to work without React. A separate createReactNexus adapter wraps it and adds hooks such as use, useSelector, and useRerender. Keeping the adapter separate means the state and subscription model does not depend on React, while React users still get hooks tailored to component rendering.
Best Value
What Georg’s performance figures show
Georg’s 2026 article compares nexus-state with zustand 5.0.15. In a React workload with 100 components spread over 50 keys and 20 single-key updates, the reported selector and render counts were:
| Library | Selector runs | React renders |
|---|---|---|
| zustand 5.0.15 | 2,120 | 40 |
| nexus-state | 200 | 40 |
In that workload, per-key subscriptions reduced selector evaluations, while the number of renders was the same. The figures describe the author’s stated setup, not a general React benchmark.
The article also reports times for 20,000 updates run without React at several store sizes:
| Keys / components | zustand 5.0.15 | nexus-state |
|---|---|---|
| 1 key / 1 component | 3.5 ms | 5.2 ms |
| 3 keys / 5 components | 3.4 ms | 4.6 ms |
| 5 keys / 10 components | 4.6 ms | 4.8 ms |
| 10 keys / 20 components | 6.3 ms | 5.0 ms |
| 50 keys / 100 components | 32.3 ms | 8.5 ms |
| 100 keys / 500 components | 155.3 ms | 13.1 ms |
In Georg’s reported results, zustand is faster in the smallest cases, while nexus-state’s timings are lower from the 10-key workload onward. That pattern fits the implementation trade-off he describes: per-key subscriptions add overhead in small stores, but can avoid broader selector work as the number of keys and components grows. The article does not provide enough environment detail, repeated runs, or full methodology to reproduce the comparison independently, so the millisecond values should be read as results for those reported workloads—not as a universal ranking.
Quick Recap
What the design progression teaches
- A minimal shared store needs state access and a subscription mechanism; React rendering can be connected separately.
- A dispatcher makes recognized update types explicit, while closure-based actions can remove the separate registration and routing layer.
- Context can distribute a stable store reference while subscriptions handle changing data.
- Features such as batching, provenance, persistence, middleware, and per-key listeners solve distinct coordination problems, but each adds implementation complexity.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




