MarkupText uses dangerouslySetInnerHTML under the hood and due to a known issue in preact any parent component updates will trigger a reapply of dangerouslySetInnerHTML within the child MarkupText.
This will happen even if the MarkupText is not affected directly and can have quite severe performance implications.
MarkupText
usesdangerouslySetInnerHTML
under the hood and due to a known issue in preact any parent component updates will trigger a reapply ofdangerouslySetInnerHTML
within the childMarkupText
.This will happen even if the
MarkupText
is not affected directly and can have quite severe performance implications.A fix has been attempted https://github.com/developit/preact/pull/894, but it's not stable.
In this example MarkupText will update on every mouse move even through the state isn't even used in the render method.