Angular Gen2 - SSR and hydration
k-schneider opened this issue · 0 comments
k-schneider commented
Describe the bug
I'm been exploring using Builder content in an Angular v19 application using the gen2 sdk. Angular has automatic support for caching http requests made on the server and preserving the response for hydration on the client (to avoid duplicate requests). This only works, as far as I know, if you're using the Angular HttpClient.
I've observed that fetchEntries and fetchOneEntry is not benefiting from this. The request for content is made on the server and then re-executed again on the client during hydration.
To Reproduce
Steps to reproduce the behavior:
- Angular SSR project using builder
- Add a resolver that fetches data using fetchOneEntry
- Observe that the request for page content is executed again on the client
Expected behavior
The request for page content should only be needed once during SSR.