Hi Guys! I'm working on a project that uses an API that is quite slow, sometimes a request takes ~2-3s. I can't do anything about the API so I would like to be sure, that users will get some visual indication that something is loading under the hood when navigating my site. What is more, the project will have around ~1M pages (let's call them product pages) and it is very highly possible that one product will be opened only by one person, only once. That's why I don't want to depend on cache.
I realised that when going to (clicking on a link) a page that is using generateMetadata there is no indication that something is loading untill the fetch request from inside the generateMetadata finishes. So for a user, that clicks on a Link to a page, nothing happens for 2-3 seconds. The browser is not showing that anything is loading and react's suspense is not triggered.
I've created a minimal reproduction of this issue here:
https://codesandbox.io/p/github/wiwo-dev/generatemetadata-loading-issue/main
And here is the repo for this: https://github.com/wiwo-dev/generatemetadata-loading-issue
Contribute to wiwo-dev/generatemetadata-loading-issue development by creating an account on GitHub.