Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available: AWSUI-60250
Description of changes:
Adds React 19 as a supported peer dependency. Tested locally by updating
react
and@types/react
to 19.0.0 and seeing if it complains about anything (see next paragraph). The two considerations of note were:React.RefObject<T>
goes from{ readonly current: T | null }
to{ current: T }
, which means we need to include thenull
alternative ourselves. Adding a| null
here should be backwards compatible, but this is a change to the interfaces that needs to be called out.useReducer
typings. React's migration guidelines of "not to pass type arguments to useReducer" is correct, but I had to make some small changes to make sure this also worked in earlier versions.We've gotta have a talk about the growing number of React version permutations we somehow have to test against. Currently, this added support is untested (outside of my local testing before I made this PR). Should we have some kind of script to rerun unit tests against different versions of React? I don't feel so confident about a single test suite (in any of our packages) covering four major versions over five years of React releases.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.