-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support react@18 #220
Support react@18 #220
Conversation
miafan23
commented
Mar 18, 2024
•
edited
Loading
edited
- Add react 18 to the allowed peer dependencies
- Bump @mapbox/react-submittable to allow react 18 as peer depemdency
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.
@miafan23 left a couple of questions! Could you fill out the description of this PR for our future selves? It would be good to know about the necessity of this change, the Jira ticket this is references and the change to react-submittable
.
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.
What's up with these weird snapshot changes?
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.
Radix changes the id for React 18 for better support of SSR
https://github.com/radix-ui/primitives/blob/main/packages/react/id/src/id.tsx#L10
https://www.radix-ui.com/primitives/docs/guides/server-side-rendering
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.
Good to know this has been consolidated into the latest version of @testing-library/react
!
package.json
Outdated
}, | ||
"dependencies": { | ||
"@mapbox/mbx-assembly": "^1.5.0", | ||
"@mapbox/query-selector-contains-node": "^1.0.0", | ||
"@mapbox/react-submittable": "^2.1.0-alpha.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.
What changes happened here besides the new package name? It's not great adding an alpha
dependency if we don't need to.
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.
Oh, I am just waiting for mapbox/react-submittable#9 to be merged and released
package.json
Outdated
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@mapbox/mr-ui", | |||
"version": "2.9.0", | |||
"version": "3.0.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.
Why is this a major version bump if it still supports 16
?
@tristen This is a public repo, I am not sure if we should refer jira ticket here 🤔 |
await waitFor(() => { | ||
expect(screen.getByText('Tab 1 content')).toBeInTheDocument(); | ||
}) |
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.
These tests sometime failed