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

Fix warning on ReactDOM.render by using React 18 client API. #3364

Closed
wants to merge 4 commits into from

Conversation

radglob
Copy link
Contributor

@radglob radglob commented Jun 5, 2023

Updated ConfirmationDialog to use React 18's createRoot API instead of ReactDOM.render.

Closes #2990.

We may want to look into using the Portal API to avoid rendering a separate React app in the future.

Screenshots

Please provide before/after screenshots for any visual changes

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Changes are SSR compatible
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@radglob radglob requested review from a team and josepmartins June 5, 2023 15:35
@changeset-bot
Copy link

changeset-bot bot commented Jun 5, 2023

🦋 Changeset detected

Latest commit: f5f5cca

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 101.68 KB (+0.02% 🔺)
dist/browser.umd.js 102.25 KB (+0.02% 🔺)

@joshblack
Copy link
Member

@radglob could you target the next-major branch for this when you get the chance? Sadly the react-dom/client stuff won't work with v17 so we have to have a hard change to v18 for it 😞

@radglob
Copy link
Contributor Author

radglob commented Jun 5, 2023

@radglob could you target the next-major branch for this when you get the chance? Sadly the react-dom/client stuff won't work with v17 so we have to have a hard change to v18 for it 😞

Ah, yeah, sure thing.

@radglob
Copy link
Contributor Author

radglob commented Jun 5, 2023

Need to target next-major, will do so in a new branch.

@radglob radglob closed this Jun 5, 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

Successfully merging this pull request may close these issues.

useConfirm calls deprecated ReactDOM.render, triggering warning in React 18
2 participants