Relative links and useNavigation #10276
Unanswered
MaxLardenois
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was using
useNavigation
to detect and do some side-effects on navigations event but I realized that when using relative links (like<Link to="..">...
) no navigation event is fired.I understand that for a relative link no request is made but from the point of view of the client there is what we can call a navigation event...
I have an example here https://stackblitz.com/edit/remix-run-remix-jael6p?file=app%2Froot.tsx
Note: for my use-case I can use
useLocation
hook and it might be the reason navigation events are tied to actual network requests?Beta Was this translation helpful? Give feedback.
All reactions