Skip to content

Commit 7c14913

Browse files
authored
fix(cli): Rename createRouter to getRouter in TanStack Start (#594)
1 parent cf7b315 commit 7c14913

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/cli/templates/frontend/react/tanstack-start/src/router.tsx.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { orpc, queryClient } from "./utils/orpc";
2626
{{/if}}
2727

2828
{{#if (eq backend "convex")}}
29-
export function createRouter() {
29+
export function getRouter() {
3030
const CONVEX_URL = (import.meta as any).env.VITE_CONVEX_URL!;
3131
if (!CONVEX_URL) {
3232
console.error("missing envar VITE_CONVEX_URL");
@@ -105,7 +105,7 @@ const trpc = createTRPCOptionsProxy({
105105
{{else if (eq api "orpc")}}
106106
{{/if}}
107107

108-
export const createRouter = () => {
108+
export const getRouter = () => {
109109
const router = createTanStackRouter({
110110
routeTree,
111111
scrollRestoration: true,
@@ -143,6 +143,6 @@ export const createRouter = () => {
143143

144144
declare module "@tanstack/react-router" {
145145
interface Register {
146-
router: ReturnType<typeof createRouter>;
146+
router: ReturnType<typeof getRouter>;
147147
}
148148
}

0 commit comments

Comments
 (0)