Server: Phase 2 (REVIEW not respected yet)
This commit is contained in:
1 parent
5d16ded553
commit
142b47674d
4271 files changed
+1203269
No files matched your search
+20
@@ -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
|
||||
Reference in new issue
Block a user