# @nanostores/react

> React integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores

Latest version **2.0.1** (published 2026-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nanostores/react
pnpm add @nanostores/react
yarn add @nanostores/react
bun add @nanostores/react
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2026-09-02 |
| First published | 2021-10-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | ^22.0.0 \|\| ^24.0.0 \|\| >=26.0.0 |
| Dependencies | 0 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 141 |
| Author | Andrey Sitnik |
| Maintainers | ai |
| Keywords | react, react native, state, state manager, store |

## Links

- npm: https://www.npmjs.com/package/@nanostores/react
- Repository: https://github.com/nanostores/react
- Homepage: https://github.com/nanostores/react#readme
- Issues: https://github.com/nanostores/react/issues
- Funding: https://github.com/sponsors/ai
- npm.io page: https://npm.io/package/@nanostores/react

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2026-09-02
- 2.0.0 — 2026-09-02
- 1.1.0 — 2026-03-16
- 1.0.1 — 2026-03-14
- 1.0.0 — 2025-04-10
- 0.8.4 — 2024-12-18
- 0.8.3 — 2024-12-18
- 0.8.2 — 2024-11-29
- 0.8.1 — 2024-11-27
- 0.8.0 — 2024-09-23
- 0.7.3 — 2024-08-03
- 0.7.2 — 2024-02-20
- 0.7.1 — 2023-05-25
- 0.7.0 — 2023-05-24
- 0.6.0 — 2023-05-08
- … 11 more at https://npm.io/package/@nanostores/react/versions

## README

# Nano Stores React

<img align="right" width="92" height="92" title="Nano Stores logo"
     src="https://nanostores.github.io/nanostores/logo.svg">

React integration for **[Nano Stores]**, a tiny state manager
with many atomic tree-shakable stores.

- **Small.** Around 1 KB. Zero dependencies.
- **Fast.** With small atomic and derived stores, you do not need to call
  the selector function for all components on every store change.
- **Tree Shakable.** The chunk contains only stores used by components
  in the chunk.
- Was designed to move logic from components to stores.
- It has good **TypeScript** support.

```tsx
import { useStore } from '@nanostores/react'
import { $profile } from '../stores/profile.js'

export const Header = ({ postId }) => {
  const profile = useStore($profile)
  return <header>Hi, {profile.name}</header>
}
```

[Nano Stores]: https://github.com/nanostores/nanostores/

---

<img src="https://cdn.evilmartians.com/badges/logo-no-label.svg" alt="" width="22" height="16" />  Nano Stores React is built by <b><a href="https://evilmartians.com/">Evil Martians</a></b>, an American design and engineering consultancy for <b>developer tools, AI, and cybersecurity startups</b>.

---

## Docs
Read full docs **[here](https://github.com/nanostores/react#readme)**.

---
_Source: https://npm.io/package/@nanostores/react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
