4 ms·
I notice that ReactDOM.render is also deprecated. In our embedded/plugin component scenario where we are given a <div> to load in, it appears we should replace
by mtone 4y ago
I notice that ReactDOM.render is also deprecated.
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(....
- danabramov 4y agoReactDOM.render has been deprecated since React 18. If you're running React 18 with ReactDOM.render, you should already see an error urging you to switch because essentially ReactDOM.render works in React 17 mode. Yeah you want const root = createRoot(domNode) root.render(<Stuff />) (or the JSX transform output equivalent)
- mtone 4y agoWe're not on 18 yet but things are clear, thanks!