You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -35,43 +35,38 @@ export class HeaderWrapperComponent
35
35
36
36
constructor(){}
37
37
ngOnChanges(changes: SimpleChanges): void{
38
-
// note: It works, but I get this warning from changed events (from the @Input update approach)
39
-
// Warning: You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.
40
-
// I've decided to ignore it since the render is efficient
41
-
// If you call render on the same root more than once, React will update the DOM as necessary to reflect the latest JSX you passed. React will decide which parts of the DOM can be reused and which need to be recreated by “matching it up” with the previously rendered tree. Calling render on the same root again is similar to calling the set function on the root component: React avoids unnecessary DOM updates.
42
-
// see https://react.dev/learn/preserving-and-resetting-state
43
-
// these can be avoided by using the document.addEventListener approach
44
-
// it is also avoided with calling createRoot in the main.ts file
// note: I do get this warning from ngAfterViewInit and changed events
53
+
// Warning: You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.
54
+
// I've decided to ignore it since the render is efficient
55
+
// If you call render on the same root more than once, React will update the DOM as necessary to reflect the latest JSX you passed. React will decide which parts of the DOM can be reused and which need to be recreated by “matching it up” with the previously rendered tree. Calling render on the same root again is similar to calling the set function on the root component: React avoids unnecessary DOM updates.
56
+
// see https://react.dev/learn/preserving-and-resetting-state
// Warning: You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.
0 commit comments