by mtone · 3y ago · 0 comments
In our embedded/plugin component scenario where we are given a <div> to load in, it appears we should replace our current pattern ReactDOM.render(React.createElement(... with createRoot(_jsx(....
Yeah you want
const root = createRoot(domNode) root.render(<Stuff />)
(or the JSX transform output equivalent)