This commit is contained in:
rex
2025-08-28 14:30:06 +08:00
parent bd804045e6
commit 8dd468a5e3
21 changed files with 2143 additions and 81 deletions

11
src/store/global.tsx Normal file
View File

@@ -0,0 +1,11 @@
import { create } from "zustand";
type GlobalState = {
count: number;
increment: () => void;
};
export const useGlobalStore = create<GlobalState>((set) => ({
count: 0,
increment: () => set((state) => ({ count: state.count + 1 })),
}));