Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nanostores/react
React integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores
https://github.com/nanostores/react
Last synced: 5 days ago
JSON representation
React integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores
- Host: GitHub
- URL: https://github.com/nanostores/react
- Owner: nanostores
- License: mit
- Created: 2021-10-14T16:31:16.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-23T11:36:40.000Z (about 2 months ago)
- Last Synced: 2024-10-04T03:12:53.777Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 486 KB
- Stars: 76
- Watchers: 3
- Forks: 15
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 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.```tsx
import { useStore } from '@nanostores/react'import { profile } from '../stores/profile.js'
export const Header = () => {
const { userId } = useStore(profile)
return {currentUser.name}
}
```[Nano Stores]: https://github.com/nanostores/nanostores/
---
Made at Evil Martians, product consulting for developer tools.
---