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

replace ReactDOM.render() with createRoot() for React 18 compatibility #10369

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

BurakParsAydin
Copy link
Contributor

@BurakParsAydin BurakParsAydin commented Feb 13, 2025

Fixes #7074


  • Run npm run changelog to add a changelog file, choose patch to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.
  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

@BurakParsAydin
Copy link
Contributor Author

I have reviewed additional files and found that there are still more that need to be updated. Please hold off on merging the pull request until I have addressed these as well.

@BurakParsAydin
Copy link
Contributor Author

I have updated the other files as well. However, there are two additional files that still need to be updated. I have already attempted to update them, but an error occurs. The file paths are as follows:
/client/order/order-status-change-strategies/index.tsx
/client/overview/task-list/tasks/go-live-task.tsx

@dmvrtx
Copy link
Contributor

dmvrtx commented Feb 27, 2025

It appears that external imports should be updated too, to import createRoot as suggested in the update path

@BurakParsAydin
Copy link
Contributor Author

@dmvrtx Just to clarify, would you like me to update React to version 18 in the package.json file as well? We are currently using version 17.0.2, and I want to ensure everything is consistent with the recommended changes. Thank you!

@dmvrtx
Copy link
Contributor

dmvrtx commented Feb 27, 2025

I suggest fixing the deprecations in this pull request and bumping React version in a follow-up.

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.

Warning to use createRoot instead ReactDOM.render
2 participants