Server: Phase 2 (REVIEW not respected yet)

This commit is contained in:
Thomas Karner committed 2026-09-21 11:24:43 +02:00
1 parent 5d16ded553
commit 142b47674d
4271 files changed
+1203269

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import { createStore } from "@tanstack/store";
import { useState } from "react";
//#region src/useCreateStore.ts
function useCreateStore(valueOrFn, actions) {
const [store] = useState(() => {
if (typeof valueOrFn === "function") return createStore(valueOrFn);
if (actions) return createStore(valueOrFn, actions);
return createStore(valueOrFn);
});
return store;
}
//#endregion
export { useCreateStore };
//# sourceMappingURL=useCreateStore.js.map