@tanstack/react-router 1.121.24 → 1.121.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.d.cts +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/llms/rules/api.d.ts +1 -1
- package/dist/llms/rules/api.js +6 -5
- package/dist/llms/rules/guide.d.ts +1 -1
- package/dist/llms/rules/guide.js +8 -8
- package/dist/llms/rules/routing.d.ts +1 -1
- package/dist/llms/rules/routing.js +7 -7
- package/dist/llms/rules/setup-and-architecture.d.ts +1 -1
- package/dist/llms/rules/setup-and-architecture.js +41 -28
- package/package.json +2 -2
- package/src/index.tsx +1 -0
package/dist/llms/rules/api.js
CHANGED
|
@@ -932,7 +932,7 @@ type beforeLoad = (
|
|
|
932
932
|
type loader = (
|
|
933
933
|
opts: RouteMatch & {
|
|
934
934
|
abortController: AbortController
|
|
935
|
-
cause: 'enter' | 'stay'
|
|
935
|
+
cause: 'preload' | 'enter' | 'stay'
|
|
936
936
|
context: TAllContext
|
|
937
937
|
deps: TLoaderDeps
|
|
938
938
|
location: ParsedLocation
|
|
@@ -940,6 +940,7 @@ type loader = (
|
|
|
940
940
|
preload: boolean
|
|
941
941
|
parentMatchPromise: Promise<MakeRouteMatchFromRoute<TParentRoute>>
|
|
942
942
|
navigate: NavigateFn<AnyRoute> // @deprecated
|
|
943
|
+
route: AnyRoute
|
|
943
944
|
},
|
|
944
945
|
) => Promise<TLoaderData> | TLoaderData | void
|
|
945
946
|
\`\`\`
|
|
@@ -2158,7 +2159,7 @@ A new function that accepts a single argument of type [\`RouteOptions\`](../Rout
|
|
|
2158
2159
|
\`\`\`tsx
|
|
2159
2160
|
import { createFileRoute } from '@tanstack/react-router'
|
|
2160
2161
|
|
|
2161
|
-
export const Route = createFileRoute({
|
|
2162
|
+
export const Route = createFileRoute('/')({
|
|
2162
2163
|
loader: () => {
|
|
2163
2164
|
return 'Hello World'
|
|
2164
2165
|
},
|
|
@@ -2984,7 +2985,7 @@ const searchSchema = z.object({
|
|
|
2984
2985
|
two: z.string().optional(),
|
|
2985
2986
|
})
|
|
2986
2987
|
|
|
2987
|
-
export const Route = createFileRoute({
|
|
2988
|
+
export const Route = createFileRoute('/')({
|
|
2988
2989
|
validateSearch: zodValidator(searchSchema),
|
|
2989
2990
|
search: {
|
|
2990
2991
|
middlewares: [retainSearchParams(true)],
|
|
@@ -3073,7 +3074,7 @@ const searchSchema = z.object({
|
|
|
3073
3074
|
two: z.string().default(defaultValues.two),
|
|
3074
3075
|
})
|
|
3075
3076
|
|
|
3076
|
-
export const Route = createFileRoute({
|
|
3077
|
+
export const Route = createFileRoute('/')({
|
|
3077
3078
|
validateSearch: zodValidator(searchSchema),
|
|
3078
3079
|
search: {
|
|
3079
3080
|
// strip default values
|
|
@@ -3111,7 +3112,7 @@ const searchSchema = z.object({
|
|
|
3111
3112
|
two: z.string().default('xyz'),
|
|
3112
3113
|
})
|
|
3113
3114
|
|
|
3114
|
-
export const Route = createFileRoute({
|
|
3115
|
+
export const Route = createFileRoute('/')({
|
|
3115
3116
|
validateSearch: zodValidator(searchSchema),
|
|
3116
3117
|
search: {
|
|
3117
3118
|
// remove all search params
|