Open sacarvy opened 11 months ago
Hi, I'm wondering what the usual way is to "prerender" for example a footer with external data attached to it? I'm currently loading data in a global +layout.server.ts, but I notice that every time a page request is made clientside the __data.json
of that page is filled with that global data, even though that data does not change. So it sends unneeded data. I'm wondering if there's a better way.
Describe the problem
Currently, how the rendering works is on page level, not on component level specific! Sometimes, components such as Header, Footer or Sidebar are just needed to get re-rendered once during the time of build and never again!
Describe the proposed solution
With RSC we have cache, something similar to that maybe we can have
Alternatives considered
Alternative in front of me is to utilise the pre-render option at the page level
Importance
nice to have