mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
updated getting-started doc with more examples (#2348)
* updated readme with more examples * moved example to docs from readme * formatted code with Prettier --------- Co-authored-by: Ankit Sagar <ankit.sagar@telnesstech.com>
This commit is contained in:
parent
08d13764ba
commit
3c6dc2d12b
@ -49,6 +49,7 @@ const useStore = create((set) => ({
|
||||
bears: 0,
|
||||
increasePopulation: () => set((state) => ({ bears: state.bears + 1 })),
|
||||
removeAllBears: () => set({ bears: 0 }),
|
||||
updateBears: (newBears) => set({ bears: newBears }),
|
||||
}))
|
||||
```
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user