Skip to content

Conversation

@necolas
Copy link
Contributor

@necolas necolas commented Jun 11, 2025

This diff bumps the dep requirements to React Native 0.79.5 and React 19.0.0 (can't use 19.1.0 with React Native 0.79.5).

There is also a change to how React Native is configured to use W3C layout conformance. This can no longer be done automatically by RSD and requires the use of a special prop on the root html element of the app, which will render the necessary React Native component behind the scenes. On web, nothing happens.

Some unit tests are also modified to check for RSD-specific warnings and errors, to work around the increase in errors caused by the upgrade to react-test-renderer, which is deprecated for React 19. However, there is no good cross-platform testing alternative at this stage, with the React recommended 3P libraries having incompatible APIs.

@github-actions
Copy link

github-actions bot commented Jun 11, 2025

workflow: benchmarks/size

Comparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.

Results Base Patch Ratio
react-strict-dom/dist/dom/index.js
· compressed 2,513 2,514 1.00 +
· minified 8,695 8,691 1.00 -
react-strict-dom/dist/dom/runtime.js
· compressed 855 855 1.00
· minified 2,435 2,435 1.00
react-strict-dom/dist/native/index.js
· compressed 16,243 16,021 0.99 -
· minified 60,801 59,887 0.98 -

@necolas necolas force-pushed the react-19-update branch 2 times, most recently from 06fa166 to da1cc48 Compare June 11, 2025 21:30
@github-actions
Copy link

github-actions bot commented Jun 11, 2025

workflow: benchmarks/perf (native)

Comparison of performance test results, measured in operations per second. Larger is better.

Results Base Patch Ratio
css.create
· small 1,114,756 1,084,783 0.97 -
· small with units 401,488 420,958 1.05 +
· small with variables 646,361 622,382 0.96 -
· several small 301,897 310,161 1.03 +
· large 196,354 196,570 1.00 +
· large with polyfills 140,402 140,564 1.00 +
· complex 94,286 97,302 1.03 +
· unsupported 211,383 207,280 0.98 -
css.createTheme
· simple theme 215,575 226,131 1.05 +
· polyfill theme 212,759 199,884 0.94 !!
css.props
· small 230,693 287,119 1.24 !!
· small with units 189,078 209,788 1.11 !!
· small with variables 99,815 114,096 1.14 !!
· small with variables of units 73,084 75,142 1.03 +
· large 99,723 123,819 1.24 !!
· large with polyfills 35,411 39,963 1.13 !!
· complex 22,325 24,579 1.10 !!
· unsupported 140,359 175,867 1.25 !!
· simple merge 158,957 179,204 1.13 !!
· wide merge 16,538 18,760 1.13 !!
· deep merge 16,808 17,870 1.06 !!
· themed merge 29,010 35,854 1.24 !!

@necolas
Copy link
Contributor Author

necolas commented Jun 11, 2025

Fix for RN flow types facebook/react-native#51908

@MoOx
Copy link
Contributor

MoOx commented Jun 19, 2025

🎉 RN 0.79.4 is available and fixes the issue with Flow types

@necolas
Copy link
Contributor Author

necolas commented Jun 23, 2025

0.79.4 is still broken

New pick request for 0.79.5 should fix it reactwg/react-native-releases#1000

necolas and others added 5 commits July 2, 2025 11:24
Ignore react-test-renderer deprecation warnings for now.

Close #300
React Native removed the 'experimental_layoutConformance' prop from View
and introduced the 'experimental_LayoutConformance' component. This new
component is expected to wrap any tree that needs to opt into W3C
layout.

Use of the new component now requires explicit setting of a prop on
'html.*' elements - 'data-layoutconformance="strict"'. This is done to
avoid wrapping every `View` in a `LayoutConformance` component, since
that now alters the component tree rather than just adding a prop.
Adding a prop to RSD elements is also preferred because it avoids two
other problems: 1) Developers having to import from 'react-native' in a
file that might otherwise be expected to be cross-platform, 2) React
Native for Web having to add support for this export to avoid crashing
Expo apps (unless using file forks.)

The use of another special 'data-*' attribute avoids React DOM warnings
about unrecognized properties on web.

Fix #245
Replace the polyfills with the built-in support for `marginInline`, etc.

Close #219
@necolas necolas force-pushed the react-19-update branch from a5be649 to 7f3f7f8 Compare July 2, 2025 18:24
We can't tell jest to ignore certain branches for coverage purposes
because the hermes parser removes the necessary code comments.

facebook/hermes#1098
@necolas necolas changed the title Upgrade to React 19.0.0 and React Native 0.79.3 Upgrade to React 19.0.0 and React Native 0.79.5 Jul 2, 2025
@necolas necolas merged commit 2632ac0 into main Jul 2, 2025
7 checks passed
@necolas necolas deleted the react-19-update branch July 2, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants