update files-state, add toast, add zustand

This commit is contained in:
smanylov
2025-12-29 14:00:02 +07:00
parent fffd38a812
commit 198a01d026
9 changed files with 134 additions and 52 deletions
+23
View File
@@ -0,0 +1,23 @@
import { create } from 'zustand'
import { devtools } from 'zustand/middleware'
interface Store {
value: any
setValue: (value: any) => void
}
export const useStoreWithDevtools = create<Store>()(
devtools(
(set) => ({
value: 0,
setValue: (value) => set({ value }),
}),
{
name: 'DevStore', // имя для DevTools
}
)
)
/* пример */
/* const setText = useStoreWithDevtools(s => s.setValue); */
/* const text = useStoreWithDevtools(s => s.value); */