[AppRouter+SSR] Which composition pattern should I use to prevent duplicate data in html & scripts?
Unanswered
Highlander posted this in #help-forum
HighlanderOP
I am building a custom frontend for a CMS/blog. I fetch the data in an
async function getData in [slug]/page.tsx and render it in the template. But what I see is that the data is present in the HTML (SSR) but also in self.__next_f.push , I have no intention of ever wanting hydration on content like this and want to reduce my HTML size and javascript footprint as much as possible. Is there a way to achieve this?1 Reply
@Highlander I am building a custom frontend for a CMS/blog. I fetch the data in an `async function getData` in `[slug]/page.tsx` and render it in the template. But what I see is that the data is present in the HTML (SSR) but also in `self.__next_f.push` , I have no intention of ever wanting hydration on content like this and want to reduce my HTML size and javascript footprint as much as possible. Is there a way to achieve this?
if you render something in server components and [the page is not bailed to client-side rendering](https://nextjs.org/docs/app/api-reference/functions/use-search-params#static-rendering), then it will not be hydrated and will probably not show up in
self.__next_f.push