Installation
SuperState is incredibly lightweight (less than ~1KB minified/gzipped) and has zero dependencies outside of React itself.
#Package Managers
Install the package using your preferred package manager. SuperState requires React 16.8+ (for Hooks) but is heavily optimized for React 18+.
Nnpm
ts
app/page.tsx1npm install react-use-superstate
YYarn
ts
app/page.tsx1yarn add react-use-superstate
Ppnpm
ts
app/page.tsx1pnpm add react-use-superstate
BBun
ts
app/page.tsx1bun add react-use-superstate
#System Requirements
- React≥ 16.8.0
- React DOM / React Native≥ 16.8.0
React 18 & 19 Ready
SuperState is built firmly on
useSyncExternalStore, making it completely resilient to React 18's concurrent rendering, strict mode, and React 19's new features.NextQuick Start