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
Copy file name to clipboardExpand all lines: src/app/header/header-wrapper.component.tsx
+2
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,8 @@ export class HeaderWrapperComponent
54
54
// I've decided to ignore it since the render is efficient
55
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
56
// see https://react.dev/learn/preserving-and-resetting-state
57
+
// note: I attempted to avoid it in https://github.com/aligneddev/angular-plus-react/commit/8d39025cb099d0f5ca3ee9026bcefb5cd5e942ec, but updating didn't work so I reverted it
58
+
// lesson: use the document.dispatchEvent to change values
0 commit comments