Skip to content
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

Deprecate ReactDOM.render #779

Closed
jchavarri opened this issue Sep 13, 2023 · 5 comments
Closed

Deprecate ReactDOM.render #779

jchavarri opened this issue Sep 13, 2023 · 5 comments

Comments

@jchavarri
Copy link
Collaborator

When using ReactDOM.render, React.js will show these warnings at runtime:

    console.error
      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. Learn more: https://reactjs.org/link/switch-to-createroot

This can be seen in the tests.

We should probably deprecate ReactDOM.render showing a similar warning, and remove them in a future version (or wait until React removes it).

@davesnx
Copy link
Member

davesnx commented Sep 13, 2023

That sounds good, also migrate those tests 😮‍💨

@anmonteiro
Copy link
Member

part of #756

@anmonteiro
Copy link
Member

we can either add deprecations or come up with a new alert, e.g.:

let render = ...
[@@alert react17 "..."]

@jchavarri
Copy link
Collaborator Author

part of #756

Oh, if we are removing render altogether in that PR, then I guess no deprecation step is needed?

@davesnx
Copy link
Member

davesnx commented Oct 10, 2023

Added the deprecation in #756

@davesnx davesnx closed this as completed Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants