RE

React Store

@tanstack/react-store

Framework agnostic type-safe store w/ reactive framework adapters

Utilities
store
react
typescript
@tanstack/react-store
Utilities
javascript
npm
frontend
open source
ui
Stars
893
Weekly
0
Open issues
30
Bundle
~60 kB

Installation

npm install @tanstack/react-store

Code example

import { useStore } from "@tanstack/react-store";

export function Example() {
  const value = useStore();
  return <p>{String(value)}</p>;
}

Pros & cons

Pros

  • Actively maintained by Tanner Linsley
  • 0 weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~60 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 30 open issues on GitHub

FAQs

Alternatives & similar libraries