Docs

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.tsx
npm install react-use-superstate

YYarn

ts
app/page.tsx
yarn add react-use-superstate

Ppnpm

ts
app/page.tsx
pnpm add react-use-superstate

BBun

ts
app/page.tsx
bun 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.