Files
frontend/apps/sn/app/store/store.tsx
T

15 lines
465 B
TypeScript

import { createStore } from 'zustand/vanilla';
import { tableActionsExport, tableStateExport, type tableState, type tableType } from './table';
export type SnStore = tableType;
//export type SnStore = ReturnType<typeof StoreZus>["getState"];
export const StoreZus = (initState: tableState = tableStateExport) => {
return createStore<SnStore>()((set) => {
return {
...initState,
...tableActionsExport(set)
}
})
}
//store 등록하는 부분