-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ReactDOM.render is no longer supported in React 18. #2063
Comments
Hello JoshWhite, thank you for opening an issue with us! I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌 |
We don't yet support React 18. Unfortunately due to our need to be compatible with SharePoint Framework this might take quite a while to support React 18 or need us to have separate libraries |
Ok, thanks for the info. Is it worth adding the latest version of React you support to the peerDependencies? |
That's a great suggestion, thank you! |
+1 for this. I just spent the last 6hours upgrading an app to use CRA5 and React 18 and now am getting a bunch of warnings from MGT saying "ReactDOM.render is no longer supported in React 18." There was no peer dependency warnings when upgrading. Looks like it only affects components that are templated (of which I have many). Stuck between a rock and hard place now... |
The change to have a peer dependency of React 17 has been reverted due to #2386 Upon investigation it was found that the error in the browser console when using templated components is a deprecation warning and does not stop functionality from working. And in fact the warning is not present in production builds, We are looking at making the peer dependency 17 || 18 in our v3 release. |
@JoshWhite and @NathZ1 if you have scenarios where the use of ReactDOM.render in the mgt-react package is actually breaking things I'd appreciate you sharing them so that we can work through the specific issues as we roll out v3 |
Describe the bug
Using a templated
Person
component from React Wrapper, I get the following warning in the browser console:As an example:
To Reproduce
Steps to reproduce the behavior:
npm install
the mgt-react package<Person />
component with using templates (see above)Expected behavior
The package to be updated as the warning suggests: https://reactjs.org/link/switch-to-createroot
Environment (please complete the following information):
Additional context
If I remove the template element of this, the warning goes away. Could be affecting all templates?
The text was updated successfully, but these errors were encountered: