Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

update react 18 #927

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

Closed
joazco wants to merge 2 commits into testing-library:main from joazco:React18
Closed

update react 18 #927

joazco wants to merge 2 commits into testing-library:main from joazco:React18

Conversation

Copy link

@joazco joazco commented Nov 22, 2022

What:
Update to React 18 with Node 16

Checklist:

  • Documentation updated
  • Tests
  • Ready to be merged

    I'm not sure for the tests but commit passed
  • Added myself to contributors table

Mihai1iMob and simonguo reacted with thumbs up emoji
Copy link

netlify bot commented Nov 22, 2022

Deploy Preview for react-hooks-testing-library failed.

Name Link
🔨 Latest commit c23edd6
🔍 Latest deploy log https://app.netlify.com/sites/react-hooks-testing-library/deploys/637ca298f6e9870008599090

Copy link

codecov bot commented Nov 22, 2022
edited
Loading

Codecov Report

Merging #927 (c23edd6) into main (1213443) will not change coverage.
The diff coverage is n/a.

@@ Coverage Diff @@
## main #927 +/- ##
=========================================
 Coverage 100.00% 100.00% 
=========================================
 Files 15 15 
 Lines 245 245 
 Branches 34 34 
=========================================
 Hits 245 245 

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@mpeyper mpeyper left a comment

Choose a reason for hiding this comment

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

If this works for React 18, I'm not opposed to merging this even though we are deprecating this library in favour of the RTL implementation. The lack of migration path to RTL's renderHook has been and ongoing issue and blocker for many people wanting to upgrade to React 18 (for which I am very sorry).

Last I checked, the changes to the act behaviour in React 18 made all our async tests fail, so I suspect the same will happen when the CI matrix changes are made, but I'm very happy to be wrong on this.

"install:react-16": "cross-env REACT_VERSION=^16 npm run install:react",
"install:react-17": "cross-env REACT_VERSION=^17 npm run install:react"
"install:react-17": "cross-env REACT_VERSION=^17 npm run install:react",
"install:react-18": "cross-env REACT_VERSION=^18 npm run install:react"
Copy link
Member

Choose a reason for hiding this comment

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

You will need to update the matrix here for it to run on CI.

Comment on lines +79 to +82
"@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^18.1.0",
"react": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^18.1.0",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^18.1.0",
"react-test-renderer": "^16.9.0 || ^17.0.0 || ^18.0.0 || ^18.1.0"
Copy link
Member

Choose a reason for hiding this comment

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

I think these could just be ^16.9.0 || ^17.0.0 || ^18.0.0 as ^18.1.0 is covered by the ^ on 18.0.0.

Copy link

TannerS commented Dec 27, 2024

Update?

Copy link
Member

mpeyper commented Dec 27, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@mpeyper mpeyper mpeyper requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /