@tanstack/react-router 1.121.27 → 1.121.34

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.
@@ -388,7 +388,8 @@ The \`ParsedHistoryState\` type represents a parsed state object. Additionally t
388
388
 
389
389
  \`\`\`tsx
390
390
  export type ParsedHistoryState = HistoryState & {
391
- key?: string
391
+ key?: string // TODO: Remove in v2 - use __TSR_key instead
392
+ __TSR_key?: string
392
393
  __TSR_index: number
393
394
  }
394
395
  \`\`\`
@@ -2159,7 +2160,7 @@ A new function that accepts a single argument of type [\`RouteOptions\`](../Rout
2159
2160
  \`\`\`tsx
2160
2161
  import { createFileRoute } from '@tanstack/react-router'
2161
2162
 
2162
- export const Route = createFileRoute({
2163
+ export const Route = createFileRoute('/')({
2163
2164
  loader: () => {
2164
2165
  return 'Hello World'
2165
2166
  },
@@ -2985,7 +2986,7 @@ const searchSchema = z.object({
2985
2986
  two: z.string().optional(),
2986
2987
  })
2987
2988
 
2988
- export const Route = createFileRoute({
2989
+ export const Route = createFileRoute('/')({
2989
2990
  validateSearch: zodValidator(searchSchema),
2990
2991
  search: {
2991
2992
  middlewares: [retainSearchParams(true)],
@@ -3074,7 +3075,7 @@ const searchSchema = z.object({
3074
3075
  two: z.string().default(defaultValues.two),
3075
3076
  })
3076
3077
 
3077
- export const Route = createFileRoute({
3078
+ export const Route = createFileRoute('/')({
3078
3079
  validateSearch: zodValidator(searchSchema),
3079
3080
  search: {
3080
3081
  // strip default values
@@ -3112,7 +3113,7 @@ const searchSchema = z.object({
3112
3113
  two: z.string().default('xyz'),
3113
3114
  })
3114
3115
 
3115
- export const Route = createFileRoute({
3116
+ export const Route = createFileRoute('/')({
3116
3117
  validateSearch: zodValidator(searchSchema),
3117
3118
  search: {
3118
3119
  // remove all search params