Does anyone know what is the exact equivalent of this code for React 18, what happens with the async part?
ReactDOM.render(chart, container, async () => {
//code that makes some chart cells styling and adds cells to a worksheet via exceljs
})
The render callback can be substituted with either the window.requestIdleCallback
or window.setTimeout
functions.
ReactDOM.render(<App />, rootElement, callback);
ReactDOM.createRoot(rootElement).render(<App />);
requestIdleCallback(callback);
or:
ReactDOM.createRoot(rootElement).render(<App />);
setTimeout(callback, 0);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With