-
Notifications
You must be signed in to change notification settings - Fork 27k
Description
Which @angular/* package(s) are relevant/related to the feature request?
core
Description
Currently, Angular hydration logic depends on the ApplicationRef.isStable on the client for a couple things:
- when the post-hydration DOM cleanup should happen (to remove all unclaimed DOM segments)
- when to output hydration stats into a console
- when the HttpClient cache should no longer be in use
We've received a few requests where hydration stats are not displayed in a console after hydration and in all cases this leads into ApplicationRef.isStable not emitting true. There are various reasons for this and in in vast majority of cases the problems are unrelated to hydration. However, previously this was not "visible" in the app, but with hydration the use of ApplicationRef.isStable increased and it becomes more important to get to the "stable" state.
As a first step to improve the DX, we should add a warning when the app didn't get to the "stable" state after some time (N seconds, N=10?). For this warning it'd be also important to have an error guide page to explain this problem in more details and provide some hints on how to resolve that. We could also use this error guide page to collect more information about use-cases over time.