-
Notifications
You must be signed in to change notification settings - Fork 300
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
chore(react): add support for react 19 #5826
Conversation
🦋 Changeset detectedLatest commit: 52c4865 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
1721702
to
3a8fc36
Compare
b860b9e
to
78ba219
Compare
78ba219
to
6da6e66
Compare
@@ -17,6 +17,7 @@ const ViewPrimitive: Primitive<ViewProps, 'div'> = ( | |||
isDisabled, | |||
style, | |||
inert, | |||
|
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.
Info: is this extra line separating ...rest
intentional?
I'm still seeing older versions of dependencies that don't support React 19:
When running I'm running:
|
Description of changes
Add React 19 support for React web packages. While definitely a large PR, the bulk of the changes are changes due to the removal of the global
JSX
namespace in the React 19 types.react@^19
andreact-dom@^19
peer deps in React web and core packages (React Native does not supportreact@^19
currently), example:update
ForwardRefPrimitive
interface to provide componentProps
andElement
type generics to returnedReact.Element
(ref). This change allows support of React 19 element typing while continuing support of React versions previous to 19.update
JSX.Foo
->React.JSX.Foo
due to globalJSX
namespace removal in React 19, example:undefined
to emptyuseRef
callsites:add
"jest"
and"@testing-library/jest-dom"
to"types"
field of tsconfig.base.json to allow usage of@testing-library/jest-dom
extendedjest
matchersupdate and align (where approriate) React related dev and direct dependency versions in example apps and packages:
[email protected]
->react@^18.3
@types/react@^18.2.22
->@types/react@^18.3
[email protected]
->react-dom@^18.3
@types/react-dom@^18.2.7
->@types/react-dom@^18.3.0
react-test-renderer@^18.2.0
->react-test-renderer@^18.3.0
@types/react-test-renderer@^18.0.2
->@types/react-test-renderer@^18.3.0
react-hook-form@"^7.43.5
->react-hook-form@^7.53.2
@testing-library/react-native@^12.3.0
->@testing-library/react-native@^12.9.0
@radix-ui/[email protected]
->@radix-ui/react-direction@^1.1.0
@radix-ui/[email protected]
->@radix-ui/react-dropdown-menu@^2.1.0
@radix-ui/[email protected]
->@radix-ui/react-slider@^1.2.0
bump
StorageBrowser
size thresholds due to radix dep size increasesremove
"react-router-dom"
dev dependency used in a singleLink
primitive unit test and the test itselffix typing of
DropZone
primitive components to no longer accept unsupportedforwardRef
, example (ref):"@types/emscripten"
and"@types/long"
to@aws-amplify/ui-react-liveness
tsconfig.json (ref)Issue #, if available
closes #6084
Description of how you validated changes
yarn lint && yarn build
vite
andnext@15
example apps (https://github.com/calebpollman/react-19-smoke-tests) using React 19 support tagged version of@aws-amplifyui-react@react-19
(npm)Checklist
yarn test
passes and tests are updated/addeddocs
,e2e
,examples
, or other private packages.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.