https://github.com/fryuni/nanostores-qwik
https://github.com/fryuni/nanostores-qwik
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fryuni/nanostores-qwik
- Owner: Fryuni
- License: mit
- Created: 2024-09-21T19:58:25.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-12-28T00:55:31.000Z (4 months ago)
- Last Synced: 2025-01-26T19:40:20.230Z (3 months ago)
- Language: JavaScript
- Size: 48.8 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Nano Stores Qwik
[Qwik](https://qwik.dev/) 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 { component$ } from '@builder.io/qwik'
import { useNanostore$ } from '@nanostores/qwik'import { profile } from '../stores/profile.js'
export default component$(() => {
const currentUser = useNanostore$(profile)
return {currentUser.name}
})
```[Nano Stores]: https://github.com/nanostores/nanostores/