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

chore: Support React v18 #495

Merged
merged 1 commit into from
Aug 3, 2023
Merged

chore: Support React v18 #495

merged 1 commit into from
Aug 3, 2023

Conversation

ngunna
Copy link
Contributor

@ngunna ngunna commented Aug 30, 2022

Description

Adds support for React v18, migrates example from ReactDOM.render to createRoot based on React v18 guide.

NOTE: Tests are passing, however, they are throwing the ReactDOM.render warning since it seems that even the latest react-dom/test-utils is still using ReactDOM.render under the hood. It may be best to migrate tests to something like React Testing Library or simply wait for react-dom to catch up as it isn't affecting test results in any way.

NOTE: You may notice a suspicious test change regarding a childNode length assertion. After reviewing the code, I believe the {pre} portion of what used to be rendered, is now no longer rendered because it is/would be an empty string given how the test is setup. The stubbed suggestion for "Newa" would match Newark, NJ, there is no pre section to that match, leaving you with the {bolded} and {post} portions, giving you two children, rather than three. Likely related to this change

Checklist

  • All tests passing
  • Created tests which fail without the change (if possible)
  • Extended the README / documentation, if necessary
  • Commits and PR follow conventions

@SergeyGorbatko
Copy link

Hi @yfr I'm not sure if you are still maintaining this package but it would be very helpful if you checked this PR.

Copy link
Contributor

@plumdumpling plumdumpling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you!

@plumdumpling plumdumpling merged commit de8888b into ubilabs:master Aug 3, 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.

3 participants