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

+20
View File
@@ -0,0 +1,20 @@
import { createNonReactiveMutableStore, createNonReactiveReadonlyStore } from "@tanstack/router-core";
import { isServer } from "@tanstack/router-core/isServer";
import { batch, createAtom } from "@tanstack/react-store";
//#region src/routerStores.ts
var getStoreFactory = (opts) => {
if (isServer ?? opts.isServer) return {
createMutableStore: createNonReactiveMutableStore,
createReadonlyStore: createNonReactiveReadonlyStore,
batch: (fn) => fn()
};
return {
createMutableStore: createAtom,
createReadonlyStore: createAtom,
batch
};
};
//#endregion
export { getStoreFactory };
//# sourceMappingURL=routerStores.js.map