@tanstack/react-router 1.31.26 → 1.31.28
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/Matches.cjs +4 -3
- package/dist/cjs/Matches.cjs.map +1 -1
- package/dist/cjs/lazyRouteComponent.cjs +17 -20
- package/dist/cjs/lazyRouteComponent.cjs.map +1 -1
- package/dist/cjs/route.cjs.map +1 -1
- package/dist/cjs/route.d.cts +1 -28
- package/dist/cjs/router.cjs +7 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/Matches.js +5 -4
- package/dist/esm/Matches.js.map +1 -1
- package/dist/esm/lazyRouteComponent.js +17 -20
- package/dist/esm/lazyRouteComponent.js.map +1 -1
- package/dist/esm/route.d.ts +1 -28
- package/dist/esm/route.js.map +1 -1
- package/dist/esm/router.js +7 -1
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/Matches.tsx +10 -7
- package/src/lazyRouteComponent.tsx +30 -33
- package/src/route.ts +1 -24
- package/src/router.ts +5 -1
package/src/route.ts
CHANGED
|
@@ -1021,30 +1021,7 @@ export type RootRouteOptions<
|
|
|
1021
1021
|
| 'caseSensitive'
|
|
1022
1022
|
| 'parseParams'
|
|
1023
1023
|
| 'stringifyParams'
|
|
1024
|
-
>
|
|
1025
|
-
/**
|
|
1026
|
-
* @description When using SSR and the <StartServer> component, this component, if supplied will wrap
|
|
1027
|
-
* the entire application during SSR and provide a <div id='root'> node for client-side hydration.
|
|
1028
|
-
* The shellComponent is non-reactive and will not be re-rendered on the client.
|
|
1029
|
-
* When used, it's common to render <html>, <head>, and <body> tags here.
|
|
1030
|
-
*
|
|
1031
|
-
* If your shell needs to be reactive, consider rendering your <html>, <head>, and <body> tags your
|
|
1032
|
-
* root route's component, but be VERY cautious as attempting to hydrate/render over the entire
|
|
1033
|
-
* document can and likely will lead to hydration mismatches.
|
|
1034
|
-
*
|
|
1035
|
-
* NOTE: Version 19 of React will allow using native <html>, <head>, and <body> tags in
|
|
1036
|
-
* your components, which will automatically be hoisted and kept in sync with both server
|
|
1037
|
-
* and client-side rendering. When 19 is released, this prop will be deprecated.
|
|
1038
|
-
*/
|
|
1039
|
-
shellComponent?: (props: { children: React.ReactNode }) => JSX.Element
|
|
1040
|
-
/**
|
|
1041
|
-
* @description It's suggested to first use the `meta` option in the root route and sub routes to
|
|
1042
|
-
* add meta tags. However, it may not be possible to add all types of meta tags using the `meta` option, like
|
|
1043
|
-
* "base", for example, or you may want to read from router state/context to conditionally add meta tags in a
|
|
1044
|
-
* component context.
|
|
1045
|
-
**/
|
|
1046
|
-
metaComponent?: (props: { children: React.ReactNode }) => JSX.Element
|
|
1047
|
-
}
|
|
1024
|
+
>
|
|
1048
1025
|
|
|
1049
1026
|
export function createRootRouteWithContext<TRouterContext extends {}>() {
|
|
1050
1027
|
return <
|
package/src/router.ts
CHANGED
|
@@ -1822,7 +1822,11 @@ export class Router<
|
|
|
1822
1822
|
match.status === 'success' &&
|
|
1823
1823
|
(match.invalid || (shouldReload ?? age > staleAge))
|
|
1824
1824
|
) {
|
|
1825
|
-
|
|
1825
|
+
;(async () => {
|
|
1826
|
+
try {
|
|
1827
|
+
await fetchWithRedirectAndNotFound()
|
|
1828
|
+
} catch (err) {}
|
|
1829
|
+
})()
|
|
1826
1830
|
return
|
|
1827
1831
|
}
|
|
1828
1832
|
|