Instant loading state and generateMetadata #50104
Replies: 5 comments
-
I'm having the same problem. It doesn't seems to be possible, which is unfortunate. I get what it's trying to do, but in my opinion, if there is a loading.jsx file present the metadata should be inserted later. Having a loading.jsx already hurts SEO so we should at least have the option to enable the same behavior for the metadata. |
Beta Was this translation helpful? Give feedback.
-
We are waiting for solution. |
Beta Was this translation helpful? Give feedback.
-
Open issue on this problem at #45418 |
Beta Was this translation helpful? Give feedback.
-
Thanks for raising the issue. Still no updates? 🤔 |
Beta Was this translation helpful? Give feedback.
-
has any update? xd |
Beta Was this translation helpful? Give feedback.
-
Is there a way to produce an instant loading state while generateMetadata is fetching data?
I'm currently using generateMetadata to fetch data for the opengraph title/description on a user profile page. According to the docs, Next.js waits for data fetching inside generateMetadata to complete before streaming UI to the client, but this seems to prevent users from seeing an instant loading state whenever a page is first loaded or <Link> is clicked.
Ideally, I'd like to have some type of "Loading..." indicator in my browser page title while the UI displays an instant loading state (using next app router).
Any guidance on this is much appreciated – thanks!
From Next.js App Router docs:
Beta Was this translation helpful? Give feedback.
All reactions