0Pricing
Angular Academy · Lesson

Transferring State to the Client

Avoid duplicate requests with state transfer.

The Double Fetch Problem

During SSR the server fetches data to render HTML. Without help, the client fetches the same data again after hydration, wasting a request and risking a content flicker.

TransferState To The Rescue

Angular's TransferState serializes data on the server into the HTML, then the client reads it instead of refetching. The data travels in a script tag in the response.

All lessons in this course

  1. Why Server-Side Rendering
  2. Setting Up Angular SSR
  3. Server Routes and Rendering Modes
  4. Transferring State to the Client
← Back to Angular Academy