#Next js app router loads page after 2-3 seconds of clicking
21 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
Are you in dev mode? Its probably just taking a second to build the page.
If you navigate away and back to the page is it quick then?
yeah its dev mode
surely
@latent laurel try doing the same thing after you run npm build or yarn build or pnpm build
whatever you use to run ur project
Nah it's in production
Nono it's production
Maybe I'm fetching like 3 request at the starting of the page
Are you available to troubleshoot now? I don’t wanna start trying to help and not get responses lol no shade serious question
It's off today here, I'll troubleshooting it in a while
Will post if I find anything, got a reddit post regarding this
There the post author did something with revalidate
You should had a suspense boundary to see if it’s legit just taking that long to load the data
Errr loading.tsx
ok so i shifted the request that i had at the beginning of the page tp thier individual component
all these components are async rsc
i attached suspense also outside these rsc
and a loading.tsx right next to this page
i open some other page in new tab and then i use Link to navigate to this page where the slow loading issue is than
i still see 3-4 seconds loading page then my suspense loadings
what i was expecting was a my suspense boundary to trigger (it should send a shell aka teh fallback)
and everyuthing should be very quick but it was not
the main issue is
navigating to this page takes 4-5 seconds
even after the above changes
Its in production mode what im talking about.