diff --git a/README.md b/README.md index 820b165..e8ef335 100644 --- a/README.md +++ b/README.md @@ -26,21 +26,21 @@ npm install nanostores @nanostores/solid ```ts // store.ts -import { action, atom } from 'nanostores'; +import { atom } from 'nanostores'; -export const counter = atom(0); +export const $counter = atom(0); -export const increase = action(counter, 'increase', (store) => { - counter.set(counter.get() + 1); -}); +export const increase = () => { + $counter.set($counter.get() + 1); +} ``` ```tsx import { useStore } from '@nanostores/solid'; -import { counter, increase } from './store'; +import { $counter, increase } from './store'; function Counter() { - const count = useStore(counter); + const count = useStore($counter); return

{count()} around here ...

; }