-
Notifications
You must be signed in to change notification settings - Fork 233
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
base: main
Are you sure you want to change the base?
update react 18 #927
Conversation
❌ Deploy Preview for react-hooks-testing-library failed.
|
Codecov Report
@@ 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 |
There was a problem hiding this 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" |
There was a problem hiding this comment.
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.
"@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" |
There was a problem hiding this comment.
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
.
What:
Update to React 18 with Node 16
Checklist:
I'm not sure for the tests but commit passed