Using
| Some(root) => ReactDOM.render(<App />, root)
gives the warning:
ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17
Using
| Some(root) => {
let app = ReactDOM.Experimental.createRoot(root);
ReactDOM.Experimental.render(app, <App />);
}
gives the warning:
Warning: You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".
Remove Experimental module from src/ReactDOM.re and use createRoot from React 18 and render from react-dom/client.