Angular Universal: prevent ngrx from replacing a SSR rendered value

181 views Asked by At

I'm currently using Angular 16 with Angular Universal.

I have a REST API call that returns list of items which are stored in ngrx. These items are then selected via a ngrx selector and rendered using *ngFor.

When the page is returned, these items are present in the response and rendered correctly, but then immediatly removed (I am guessing due to angular client-side reactivity). Then, the same REST API is called by the browser, and the array is rendered again.

This causes a flicker effect, which is quite horrible. I've been reading about hydration in Angular 16, but I am unable to fix it. I've tried using provideClientHydration, but I'm sure that's not as related to my issue as I initially thought.

0

There are 0 answers