Change route without calling loader #7733
-
How can I navigate to a page without invoking the loader? Even if I don't return anything in the loader, it still gets called and causes a delay in the navigation. I cannot remove the loader, because I want to use it for bots/'first page load' but not for client-side navigation(to show a loading immediately. When I use |
Beta Was this translation helpful? Give feedback.
Answered by
sergiodxa
Oct 23, 2023
Replies: 1 comment 10 replies
-
Export a function |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it's better to navigate immediately with data, have you tried adding
prefetch
to the Link? This way the browser will prefetch the data and other assets of a route and once the user clicks the link it may have already loaded or at least loaded faster.If you want to replace the current UI with a skeleton, you can detect the navigation with
useNavigation()
and render a skeleton in a parent route.