MCPcopy
hub / github.com/TanStack/router / createRoute

Function createRoute

packages/react-router/src/route.tsx:324–404  ·  view source on GitHub ↗
(
  options: RouteOptions<
    TRegister,
    TParentRoute,
    TId,
    TCustomId,
    TFullPath,
    TPath,
    TSearchValidator,
    TParams,
    TLoaderDeps,
    TLoaderFn,
    AnyContext,
    TRouteContextFn,
    TBeforeLoadFn,
    TSSR,
    TServerMiddlewares
  >,
)

Source from the content-addressed store, hash-verified

322 * @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouteFunction
323 */
324export function createRoute<
325 TRegister = unknown,
326 TParentRoute extends RouteConstraints['TParentRoute'] = AnyRoute,
327 TPath extends RouteConstraints['TPath'] = '/',
328 TFullPath extends RouteConstraints['TFullPath'] = ResolveFullPath<
329 TParentRoute,
330 TPath
331 >,
332 TCustomId extends RouteConstraints['TCustomId'] = string,
333 TId extends RouteConstraints['TId'] = ResolveId<
334 TParentRoute,
335 TCustomId,
336 TPath
337 >,
338 TSearchValidator = undefined,
339 TParams = ResolveParams<TPath>,
340 TRouteContextFn = AnyContext,
341 TBeforeLoadFn = AnyContext,
342 TLoaderDeps extends Record<string, any> = {},
343 TLoaderFn = undefined,
344 TChildren = unknown,
345 TSSR = unknown,
346 const TServerMiddlewares = unknown,
347>(
348 options: RouteOptions<
349 TRegister,
350 TParentRoute,
351 TId,
352 TCustomId,
353 TFullPath,
354 TPath,
355 TSearchValidator,
356 TParams,
357 TLoaderDeps,
358 TLoaderFn,
359 AnyContext,
360 TRouteContextFn,
361 TBeforeLoadFn,
362 TSSR,
363 TServerMiddlewares
364 >,
365): Route<
366 TRegister,
367 TParentRoute,
368 TPath,
369 TFullPath,
370 TCustomId,
371 TId,
372 TSearchValidator,
373 TParams,
374 AnyContext,
375 TRouteContextFn,
376 TBeforeLoadFn,
377 TLoaderDeps,
378 TLoaderFn,
379 TChildren,
380 TSSR,
381 TServerMiddlewares

Callers 15

index.test.tsxFile · 0.90
index.test-d.tsFile · 0.90
index.test.tsxFile · 0.90
index.test-d.tsFile · 0.90
index.test.tsxFile · 0.90
index.test-d.tsFile · 0.90
FileRouteClass · 0.90
createTestRouterFunction · 0.90
link.test-d.tsxFile · 0.90
route.test.tsxFile · 0.90

Calls

no outgoing calls

Tested by 15

createTestRouterFunction · 0.72
setupFunction · 0.72
setupFunction · 0.72
runTestFunction · 0.72
setupRouterFunction · 0.72
setupFunction · 0.72
createTestRouterFunction · 0.72
RouterContainerFunction · 0.72
runTestFunction · 0.72
setupRouterFunction · 0.72
createTestRouterFunction · 0.72