T
TanStack5w ago
broad-brown

What is the best way to fetch deferred data for the content and meta?

Currently it seems like the best option to set/update meta tags is to fetch data in the router loader, return the data and in meta use the loader data. But the issue with this approach is that loader block page render, despite that pendingComponent is set. I've tried to fetch data from the component itself with the suspense and it seemed to work fine render wasn't blocked but updating meta from the component didn't seem to be right way to do that. Compared to next.js generateMetadata doesn't block page render and allows to stream the page. Is there any good way to solve this issue, or maybe any plans this to be improved? I think currently this is one of the most critical things should be solved to be able fully migrate from next.js.
1 Reply
extended-salmon
extended-salmon5w ago
we don't have streaming meta yet, but we will add this

Did you find this page helpful?