/opt/canhelp/node_modules/nanostores
NameSizeModeActions
atom/-0755rm
clean-stores/-0755rm
computed/-0755rm
deep-map/-0755rm
effect/-0755rm
keep-mount/-0755rm
lifecycle/-0755rm
listen-keys/-0755rm
map/-0755rm
map-creator/-0755rm
task/-0755rm
warn/-0755rm
index.d.ts9520644editdlrm
index.js6970644editdlrm
LICENSE10950644editdlrm
package.json7250644editdlrm
README.md18740644editdlrm
Edit: /opt/canhelp/node_modules/nanostores/README.md (1874B)
# Nano Stores A tiny state manager for **React**, **React Native**, **Preact**, **Vue**, **Svelte**, **Solid**, **Lit**, **Angular**, and vanilla JS. It uses **many atomic stores** and direct manipulation. * **Small.** Between 271 and 802 bytes (minified and brotlied). Zero dependencies. It uses [Size Limit] to control size. * **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.** A chunk contains only stores used by components in the chunk. * Designed to move logic from components to stores. * Good **TypeScript** support. ```ts // store/users.ts import { atom } from 'nanostores' export const $users = atom([]) export function addUser(user: User) { $users.set([...$users.get(), user]); } ``` ```ts // store/admins.ts import { computed } from 'nanostores' import { $users } from './users.ts' export const $admins = computed($users, users => users.filter(i => i.isAdmin)) ``` ```tsx // components/admins.tsx import { useStore } from '@nanostores/react' import { $admins } from '../stores/admins.ts' export const Admins = () => { const admins = useStore($admins) return ( ) } ``` ---   Made at Evil Martians, product consulting for developer tools. --- [Size Limit]: https://github.com/ai/size-limit ## Docs Read full docs **[here](https://github.com/nanostores/nanostores#readme)**.