Documentation Index
Fetch the complete documentation index at: https://mintlify.com/christianbaroni/stores/llms.txt
Use this file to discover all available pages before exploring further.
@storesjs/stores is a single package that ships three runtime builds — React web, React Native, and vanilla TypeScript — selected automatically via package conditions. Install it once and import from the same specifier regardless of your target environment.
Install
@storesjs/stores requires Node.js ≥20. Check your local version with node --version before installing.Peer Dependencies
All peer dependencies are optional — install only the ones your target environment requires:| Package | Version | When required |
|---|---|---|
react | >=18.0.0 | React web apps |
react-native | >=0.69.0 | React Native apps |
react-native-mmkv | >=2.0.0 | Persistent storage in React Native |
Runtime Modes
@storesjs/stores exports different builds depending on the active package condition. The correct build is selected automatically in most toolchains.
- React (Web)
- React Native
- Vanilla (No React)
The default build. Import from Stores are callable as React hooks in this build:Compatible with React ≥18. Works with Vite, Next.js, Create React App, and any bundler that resolves
@storesjs/stores in any React web project — no configuration needed:exports.Chrome Extension Plugin
A separate entry point ships aChromeStorageAdapter for persisting store state in Chrome extension storage. Import it from the /chrome subpath:
configureStores() as your storage backend before creating any stores:
/chrome entry resolves its own types, import, and require conditions independently of the main entry point — it is always the web build, regardless of other active conditions.
The
@types/chrome types package is required in your project for the ChromeStorageAdapter import to type-check correctly. Add it as a dev dependency: npm install -D @types/chrome.