Good explanations on the diffing and performance parts, but missing a few points — content set with dangerouslySetInnerHTML
isn’t managed by React (no React event handlers inside), and using innerHTML
directly breaks React’s declarative model. Also note possible SSR/hydration mismatches and that the __html
object is intentional to force explicit use.