My Next App Routing is Slow
Unanswered
Mandarin fish posted this in #help-forum
Mandarin fishOP
Hi, please I'm building a PWA web app with NextJs, I used the next-pwa package, my problem now is that, anytime I try navigating or routing from a page to another, it takes quite a while before routing successfully,
Please how can I optimize it or make it fast, or better put a loading screen for user whilst the routing is still in progress?
Please I'd really appreciate
#discussions #help-forum #tools #routing #next-pwa #nextjs
Please how can I optimize it or make it fast, or better put a loading screen for user whilst the routing is still in progress?
Please I'd really appreciate
#discussions #help-forum #tools #routing #next-pwa #nextjs
6 Replies
@Mandarin fish Hi, please I'm building a PWA web app with NextJs, I used the next-pwa package, my problem now is that, anytime I try navigating or routing from a page to another, it takes quite a while before routing successfully,
Please how can I optimize it or make it fast, or better put a loading screen for user whilst the routing is still in progress?
Please I'd really appreciate
<#752647196419031042> <#1007476603422527558> <#1163032295599505468> #routing #next-pwa #nextjs
I assume you have data fetching on the page? try using
https://nextjs.org/docs/app/api-reference/file-conventions/loading
loading.tsx to display he loading statehttps://nextjs.org/docs/app/api-reference/file-conventions/loading
if it doesn't work, you may have to show some code on how are you doing the data fetching
@Ray if it doesn't work, you may have to show some code on how are you doing the data fetching
Mandarin fishOP
Actually some of these pages doesn't have dynamic data in them, they're just static,
But maybe this loading.tsx would help make the user wait for sometime by displaying a loading state for them
But maybe this loading.tsx would help make the user wait for sometime by displaying a loading state for them
if its static, it shouldn't be slow, have you tried the app without PWA?
@Ray if its static, it shouldn't be slow, have you tried the app without PWA?
Mandarin fishOP
No I haven't tried it with the package