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
+26
@@ -0,0 +1,26 @@
|
||||
import { getStoreFactory } from "./routerStores.js";
|
||||
import { RouterCore } from "@tanstack/router-core";
|
||||
//#region src/router.ts
|
||||
/**
|
||||
* Creates a new Router instance for React.
|
||||
*
|
||||
* Pass the returned router to `RouterProvider` to enable routing.
|
||||
* Notable options: `routeTree` (your route definitions) and `context`
|
||||
* (required if the root route was created with `createRootRouteWithContext`).
|
||||
*
|
||||
* @param options Router options used to configure the router.
|
||||
* @returns A Router instance to be provided to `RouterProvider`.
|
||||
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouterFunction
|
||||
*/
|
||||
var createRouter = (options) => {
|
||||
return new Router(options);
|
||||
};
|
||||
var Router = class extends RouterCore {
|
||||
constructor(options) {
|
||||
super(options, getStoreFactory);
|
||||
}
|
||||
};
|
||||
//#endregion
|
||||
export { Router, createRouter };
|
||||
|
||||
//# sourceMappingURL=router.js.map
|
||||
Reference in new issue
Block a user