Skip to content

Change react-dom to react-dom/client #48

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

Merged
merged 1 commit into from
Sep 25, 2022

Conversation

benfaerber
Copy link
Contributor

@benfaerber benfaerber commented Jun 30, 2022

React recommends importing the client for the new create root API. Importing from "react-dom" throws this warning in React 18

Warning: You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client

In my project I use this modification and it removes the error.

@cknitt
Copy link
Member

cknitt commented Sep 25, 2022

Thank you for your contribution! Sorry for the long delay in merging.

@cknitt cknitt merged commit b836cf2 into rescript-lang:master Sep 25, 2022
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

Successfully merging this pull request may close these issues.

2 participants