@tanstack/react-router 0.0.1-beta.46 → 0.0.1-beta.48
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 +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +57 -57
- package/build/umd/index.development.js +1 -1
- 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 +1 -1
- package/src/index.tsx +1 -1
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -544,13 +544,13 @@ export function useParams<
|
|
|
544
544
|
export function useNavigate<
|
|
545
545
|
TDefaultFrom extends keyof RegisteredAllRouteInfo['routeInfoById'] = '/',
|
|
546
546
|
>(defaultOpts: { from?: TDefaultFrom }) {
|
|
547
|
+
const router = useRouter()
|
|
547
548
|
return <
|
|
548
549
|
TFrom extends keyof RegisteredAllRouteInfo['routeInfoById'] = TDefaultFrom,
|
|
549
550
|
TTo extends string = '.',
|
|
550
551
|
>(
|
|
551
552
|
opts: MakeLinkOptions<TFrom, TTo>,
|
|
552
553
|
) => {
|
|
553
|
-
const router = useRouter()
|
|
554
554
|
return router.navigate({ ...defaultOpts, ...(opts as any) })
|
|
555
555
|
}
|
|
556
556
|
}
|