feat: support React 19 - #29
Merged
Merged
Conversation
- Widen the `react` peer dependency range to include ^19.0.0 - Replace global `JSX` namespace references with `React.JSX` — React 19's typings removed the global namespace, which made `BoxProps`/`BoxComponent` silently degrade to `any` for consumers on @types/react 19. `React.JSX` resolves on @types/react 18.2.21+ (the pinned devDep is 18.3.18) and 19.
React 19 ignores defaultProps on function components, which silently dropped the box-sizing: border-box default from every Box. Apply it inline only when absent — mirroring React's resolveDefaultProps order — so snapshot output is byte-identical on React 16-18. The is: 'div' default was already redundant with the is || 'div' fallback.
taochu
added a commit
to adtribute/mqa-evergreen
that referenced
this pull request
Jun 11, 2026
Requires the ui-box release containing the React 19 `Box.defaultProps` fix (adtribute/mqa-ui-box#29) so consumers can't resolve 5.7.0, which loses box-sizing: border-box under React 19.
harrisonhunter
approved these changes
Jun 11, 2026
harrisonhunter
left a comment
There was a problem hiding this comment.
approving proactively, not super familiar with this repo
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
reactpeer dependency range to include^19.0.0JSXnamespace references withReact.JSX— React 19's typings removed the global namespace (upgrade guide: The JSX namespace in TypeScript), which madeBoxProps/BoxComponentsilently degrade toanyfor consumers on@types/react19.React.JSXresolves on@types/react18.2.21+ (the pinned devDep is 18.3.18) and 19.Box.defaultProps— React 19 ignoresdefaultPropson function components (upgrade guide: Removed propTypes and defaultProps), which silently dropped thebox-sizing: border-boxdefault from everyBox. The default is now applied inline, only when the prop is absent, mirroring React's ownresolveDefaultPropsorder so the emitted CSS/DOM is unchanged on React 16–18 (all 88 ava tests pass with unchanged snapshots). Theis: 'div'default was already redundant with theis || 'div'fallback.Release
After merge:
yarn releaseas 5.8.0 (publishes@maestroqa/ui-box; dist is rebuilt byprepublishOnly).