@tanstack/react-router 0.0.1-beta.52 → 0.0.1-beta.53
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/build/cjs/index.js.map +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +48 -48
- package/build/types/index.d.ts +2 -2
- package/build/umd/index.development.js +1 -2
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/index.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/react-router",
|
|
3
3
|
"author": "Tanner Linsley",
|
|
4
|
-
"version": "0.0.1-beta.
|
|
4
|
+
"version": "0.0.1-beta.53",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "tanstack/router",
|
|
7
7
|
"homepage": "https://tanstack.com/router/",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@babel/runtime": "^7.16.7",
|
|
44
44
|
"@solidjs/reactivity": "^0.0.7",
|
|
45
45
|
"use-sync-external-store": "^1.2.0",
|
|
46
|
-
"@tanstack/router-core": "0.0.1-beta.
|
|
46
|
+
"@tanstack/router-core": "0.0.1-beta.53"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/use-sync-external-store": "^0.0.3",
|
package/src/index.tsx
CHANGED
|
@@ -499,13 +499,13 @@ export function useParams<
|
|
|
499
499
|
|
|
500
500
|
export function useNavigate<
|
|
501
501
|
TDefaultFrom extends keyof RegisteredAllRouteInfo['routeInfoById'] = '/',
|
|
502
|
-
>(defaultOpts
|
|
502
|
+
>(defaultOpts?: { from?: TDefaultFrom }) {
|
|
503
503
|
const router = useRouter()
|
|
504
504
|
return <
|
|
505
505
|
TFrom extends keyof RegisteredAllRouteInfo['routeInfoById'] = TDefaultFrom,
|
|
506
506
|
TTo extends string = '.',
|
|
507
507
|
>(
|
|
508
|
-
opts
|
|
508
|
+
opts?: MakeLinkOptions<TFrom, TTo>,
|
|
509
509
|
) => {
|
|
510
510
|
return router.navigate({ ...defaultOpts, ...(opts as any) })
|
|
511
511
|
}
|