NexusStore is a minimal, framework-aligned state management solution for React applications. It gives you a global store factory, a fine-grained subscription hook built onDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/iDevRanjan/nexus-store/llms.txt
Use this file to discover all available pages before exploring further.
useSyncExternalStore, and optional Immer integration for painless nested-state mutations — all without any external runtime dependencies.
Quickstart
Build your first NexusStore-powered React component in under five minutes.
Core Concepts
Understand stores, selectors, and state updates from first principles.
API Reference
Full signatures and parameter docs for every exported function.
Advanced Patterns
Immer integration, batch updates, selector optimization, and custom hooks.
Why NexusStore?
NexusStore was designed to be the smallest possible abstraction that still solves the hard problems in React state management: unnecessary re-renders, tangled update logic, and boilerplate-heavy store setup.Zero Dependencies
The core has no runtime dependencies. Add Immer only when you need it.
Surgical Re-renders
Selector subscriptions ensure a component re-renders only when its slice of state changes.
Concurrent-mode Safe
Built on React’s
useSyncExternalStore — fully compatible with React 18+ concurrent features.Immer-ready
Wrap any store with
immer() to unlock mutation-style updates for deeply nested objects and arrays.Atomic Batch Updates
Use
setMultiple to update multiple keys in a single render cycle — no extra renders.Simple Architecture
Three files, three exports. Easy to learn, easy to debug, easy to extend.
How It Works
Subscribe in a component
Use the
useStore hook with a selector to read — and reactively update — only the slice you need.Counter.jsx
NexusStore ships as source files you copy into your project. There is no npm package — see Installation for setup instructions.