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

update react 18 #927

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

update react 18 #927

wants to merge 2 commits into from

Conversation

joazco
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

@netlify
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

@codecov
Copy link

codecov bot commented Nov 22, 2022

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.

@@ -46,16 +46,17 @@
"install:react": "npm install --no-save react@${REACT_VERSION:-latest} react-dom@${REACT_VERSION:-latest} react-test-renderer@${REACT_VERSION:-latest}",
"install:react-16.9.0": "cross-env REACT_VERSION=16.9.0 npm run install:react",
"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.

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.

None yet

2 participants