@nanostores/react

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

@nanostores/react downloads @nanostores/react version @nanostores/react license

@nanostores/reactSimilar Packages:
Npm Package Weekly Downloads Trend
3 Years
🌟 Show real-time usage chart on @nanostores/react's README.md, just copy the code below.
## Usage Trend
[![Usage Trend of @nanostores/react](https://npm-compare.com/img/npm-trend/THREE_YEARS/@nanostores/react.png)](https://npm-compare.com/@nanostores/react#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 Show GitHub stars trend chart on @nanostores/react's README.md, just copy the code below.
## GitHub Stars Trend
[![GitHub Stars Trend of @nanostores/react](https://npm-compare.com/img/github-trend/@nanostores/react.png)](https://npm-compare.com/@nanostores/react)
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
@nanostores/react134,0131224.86 kB48 months agoMIT
README for @nanostores/react

Nano Stores React

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

  • Small. Less than 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.
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>
}

Made at Evil Martians, product consulting for developer tools.