Skip to content

Commit

Permalink
Merge pull request #166 from tony/patch-1
Browse files Browse the repository at this point in the history
Fix prefetching on mount (fixes #165)
  • Loading branch information
jamesknelson authored Jan 5, 2020
2 parents 137a81f 9438795 commit 126bf61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-navi/src/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 174,7 @@ export const useLinkProps = ({

// Prefetch on mount if required, or if `prefetch` becomes `true`.
React.useEffect(() => {
if (prefetch === true) {
if (prefetch === 'mount') {
doPrefetch()
}
}, [prefetch, doPrefetch])
Expand Down

0 comments on commit 126bf61

Please sign in to comment.