Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions packages/react-router/src/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -389,19 +389,16 @@ export function useLinkProps<
// computation when the leaf route/params context changes.
// eslint-disable-next-line react-hooks/rules-of-hooks
const currentLeafMatchId = useStore(router.stores.lastMatchId, (id) => id)
const from = options.from

// eslint-disable-next-line react-hooks/rules-of-hooks
const _options = React.useMemo(
() => {
return { ...options, from }
},
() => options,
// eslint-disable-next-line react-hooks/exhaustive-deps
[
router,
currentLeafMatchId,
currentLocation.hash,
from,
options.from,
options._fromLocation,
options.hash,
options.to,
Expand Down
Loading
Loading