Skip to content

Warning to use createRoot instead ReactDOM.render #7074

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

Open
shendy-a8c opened this issue Aug 27, 2023 · 6 comments · May be fixed by #10369
Open

Warning to use createRoot instead ReactDOM.render #7074

shendy-a8c opened this issue Aug 27, 2023 · 6 comments · May be fixed by #10369
Assignees
Labels
good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. Task (new)

Comments

@shendy-a8c
Copy link
Contributor

Describe the bug

When working on #7043, I saw this 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

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 to createRoot().

To Reproduce

  1. Open order edit page.
  2. See warnings in dev console.

Actual behavior

Warnings thrown:

Screenshot 2023-08-28 at 01 00 26

Expected behavior

No warning regarding ReactDOM.render.

@shendy-a8c shendy-a8c added type: bug The issue is a confirmed bug. type: task The issue is an internally driven task (e.g. from another A8c team). priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. and removed type: bug The issue is a confirmed bug. labels Aug 27, 2023
@zmaglica
Copy link
Contributor

zmaglica commented Sep 4, 2023

@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 to createRoot() as you suggested.

@zmaglica zmaglica added the good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. label Sep 4, 2023
@haszari haszari added the focus: misc or unknown Issues that need to be added to a focus area (aka "needs focus"). label Mar 11, 2024
@vbelolapotkov
Copy link
Collaborator

@deepakpathania this one is already in your backlog, so let's keep it there.

@BurakParsAydin
Copy link
Contributor

@vbelolapotkov @deepakpathania I know this is in your backlog, but once we update to React 18, I'd like to take care of this fix. Let me know if that works for you!

@deepakpathania
Copy link
Contributor

PRs are welcome. 😄

@BurakParsAydin
Copy link
Contributor

Sure, I'll create a PR 😊

@BurakParsAydin
Copy link
Contributor

@deepakpathania Just created the PR. Please ref

@deepakpathania deepakpathania removed the focus: misc or unknown Issues that need to be added to a focus area (aka "needs focus"). label Mar 27, 2025
@ebinnion ebinnion added the Task (new) label Apr 17, 2025 — with Linear
@ebinnion ebinnion removed the type: task The issue is an internally driven task (e.g. from another A8c team). label Apr 17, 2025
@vladolaru vladolaru removed the priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. label Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue The issue is a good candidate for the first community contribution/for a newcomer to the team. Task (new)
Projects
None yet
9 participants