Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nanostores/preact
Preact integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores
https://github.com/nanostores/preact
Last synced: 5 days ago
JSON representation
Preact integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores
- Host: GitHub
- URL: https://github.com/nanostores/preact
- Owner: nanostores
- License: mit
- Created: 2021-10-14T16:51:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-20T18:46:11.000Z (3 months ago)
- Last Synced: 2024-10-04T01:45:41.444Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 451 KB
- Stars: 13
- Watchers: 2
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Nano Stores Preact
Preact 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/preact'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.
---