Next.js Discord

Discord Forum

Dynamic Metadata

Unanswered
Nile Crocodile posted this in #help-forum
Open in Discord
Avatar
Nile CrocodileOP
How can I have the page with a loader before a query inside generateMetadata resolves? I always get a bit of delay

5 Replies

Avatar
loading.tsx maybe
Avatar
Nile CrocodileOP
I tried that, but generateMetadata is still resolved before. Loading.tsx only works at the page level
Avatar
Nile CrocodileOP
Am now thinking of how to pass the head metatags in the page rather that using generateMetadata
Avatar
ahh yeah i see this here: https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming#seo (i now see why, but kinda see how that messes with your plan)
Avatar
Nile CrocodileOP
They should have a way to allow us make a trade off between SEO and Performance. Like in my case, you need to be logged in to render that specific page hence SEO is no longer a concern here as compared to performance