fix(core): skip component ID collision warning during SSR#59625
fix(core): skip component ID collision warning during SSR#59625crisbeto wants to merge 1 commit intoangular:mainfrom
Conversation
The component ID collision check tries to account for components being replaced by checking for the `type`, however that might not work during SSR. These changes disable the warning since it's primarily useful on the browser anyways.
|
Thanks for fixing this warning. I'd just like to add that from what I've seen with my code, it's not just an inconvenience. It seems to also break the functionality in the browser, and then I have to re-run ng serve to get the behavior. I am unfortunately not familiar enough with Angular to know whether it's due to this issue or another one, but I started seeing it occur with this warning. |
|
@ishbir, the IDs are mainly used for style encapsulation and hydration. |
|
Is it possible that hydration is breaking somehow due to this? I do see breaks in actions performed in afterNextRender in the constructor which would suggest that the elements in the view do not get found/hydrated at the right time. I could try to create a minimally reproducible example if that would help. |
|
@ishbir, typically if there are hydration errors these are pointed out in the browser console. Please file an issue with a minimal reproduction. |
|
This PR was merged into the repository by commit 431166d. The changes were merged into the following branches: main, 19.1.x |
The component ID collision check tries to account for components being replaced by checking for the `type`, however that might not work during SSR. These changes disable the warning since it's primarily useful on the browser anyways. PR Close #59625
) The component ID collision check tries to account for components being replaced by checking for the `type`, however that might not work during SSR. These changes disable the warning since it's primarily useful on the browser anyways. PR Close angular#59625
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The component ID collision check tries to account for components being replaced by checking for the
type, however that might not work during SSR.These changes disable the warning since it's primarily useful on the browser anyways.
Closes angular/angular-cli#29408