3 ms·
The reference is used to operate on the subtree when wrapping libraries like CodeMirror https://github.com/uiwjs/react-codemirror/blob/master/core/src/index.tsx
by benatkin 2y ago
The reference is used to operate on the subtree when wrapping libraries like CodeMirror https://github.com/uiwjs/react-codemirror/blob/master/core/src/index.tsx#L146 https://github.com/uiwjs/react-codemirror/blob/master/core/s... React leaves it alone if the children doesn't change.
innerHTML is useful when there is a trusted HTML source, which is becoming more popular with stuff like HTMX and FastHTML.