Reputation: 451
I have an Angular Universal application in production working fine with makeStateKey and TransferState, i upgrade my Angular to version 16.
I see this new feature Angular Hydration and make some testing and i realize that my data from server is not being requested again in client, even if i remove the TransferState in this particular request.
My application is working fine with both but i have this doubt and don't find any clue around.
This is a small example on my application:
this.USER_KEY = makeStateKey<User>('userAuthKey
');
Upvotes: 0
Views: 1141
Reputation: 1867
You don't need it anymore because it's already done in the implementation of provideClientHydration by default.
You can see its implementation here => https://github.com/angular/angular/blob/78888190630fc1a97edb379dc03c9235cf95d7bd/packages/platform-browser/src/hydration.ts#L144C25-L144C25
Upvotes: 1