mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
addAFish should ref 'fishes', not 'fish' (#1428)
This commit is contained in:
parent
d81ac58b15
commit
2b29d73684
@ -316,7 +316,7 @@ export const useStore = create(
|
||||
persist(
|
||||
(set, get) => ({
|
||||
fishes: 0,
|
||||
addAFish: () => set({ fish: get().fish + 1 }),
|
||||
addAFish: () => set({ fishes: get().fishes + 1 }),
|
||||
}),
|
||||
{
|
||||
name: 'food-storage', // unique name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user