-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(react): Add React 18 as peer dep #4819
Conversation
22ac4a7
to
d70f29d
Compare
size-limit report 📦
|
@@ -1,4 +1,4 @@ | |||
import { render } from '@testing-library/react'; | |||
import { render, act } from '@testing-library/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 need to change this to { act, render }
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.
Fixed with 0e78d1b, thanks!
- Update tests to test against React 18 - Remove unused `react-test-renderer` dep - Update tests to use `act()`
d0b4ff8
to
b2cb636
Compare
Have to use alpha of https://github.com/testing-library/react-testing-library as it's the only one that support React 18: testing-library/react-testing-library#509 (comment). Made myself watch the releases so we can upgrade when they get to a stable version. |
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.
LGTM.
(At some point, definitely not now, we should probably change those getBy*
returned from render
to use screen
)
v13 is now released from react-testing-library which supports react 18 |
Thanks for letting me know, updated! |
@sentry/react
to include React 18react-test-renderer
depact()
: https://reactjs.org/docs/test-utils.html#actFixes #4818
Resolves https://getsentry.atlassian.net/browse/WEB-764