Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular Gen2 - SSR and hydration #3754

Open
k-schneider opened this issue Nov 21, 2024 · 0 comments
Open

Angular Gen2 - SSR and hydration #3754

k-schneider opened this issue Nov 21, 2024 · 0 comments
Assignees

Comments

@k-schneider
Copy link

k-schneider commented Nov 21, 2024

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:

  1. Angular SSR project using builder
  2. Add a resolver that fetches data using fetchOneEntry
  3. 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.

@sidmohanty11 sidmohanty11 self-assigned this Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants