init
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { create } from "zustand";
|
||||
import { create } from 'zustand';
|
||||
|
||||
type GlobalState = {
|
||||
count: number;
|
||||
@@ -7,5 +7,8 @@ type GlobalState = {
|
||||
|
||||
export const useGlobalStore = create<GlobalState>((set) => ({
|
||||
count: 0,
|
||||
increment: () => set((state) => ({ count: state.count + 1 })),
|
||||
increment: () => {
|
||||
console.log('increment');
|
||||
set((state) => ({ count: state.count + 1 }));
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user