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. Learn more: https://reactjs.org/link/switch-to-createroot
@shendy-a8c I tried to reproduce an issue on my end and I can't see the error, but we do still use ReactDOM.render in our codebase, so it would be a good idea to switch tocreateRoot() as you suggested.
Describe the bug
When working on https://github.com/Automattic/woocommerce-payments/pull/7043, I saw this warning:
We do have
ReactDOM.render()
calls in the code. Even though we specify React 17 as dependency, it might be a good idea to switch tocreateRoot()
.To Reproduce
Actual behavior
Warnings thrown:
Expected behavior
No warning regarding
ReactDOM.render
.