Repository navigation
feat[sdks][react-native]: support React 19 / New Architecture and run click actions on native taps - #4971
Open
kylefowler wants to merge 3 commits into
Open
feat[sdks][react-native]: support React 19 / New Architecture and run click actions on native taps#4971kylefowler wants to merge 3 commits into
kylefowler wants to merge 3 commits into
Conversation
…n current RN - widen `react`/`react-dom` peer range to `^18.0.0 || ^19.0.0` (RN 0.78+ requires React 19) - drop the unused `react-native-video@5` dependency (EOL, legacy architecture only); the Video block was never registered on RN, so its override is now a stub - add `e2e/react-native-83-fabric`, a native-only Expo SDK 55 / RN 0.83 harness (always Fabric + bridgeless) with a path picker, deep links and an arch readout - work around `@builder.io/react-native-render-html`'s invalid scoped podspec name in the harness via `react-native.config.js` (Expo 54+ autolinks transitive deps) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On iOS and Android, React Native ignores `onClick`, and `View` has no tap handler, so Builder click actions never ran on native (web was fine via RN Web). - pass click actions as `onPress` on native (`getEventHandlerName` override) - render blocks with a click action as a `Pressable` instead of a `View` on native (`getBlockTag`, used only by the RN SDK; other targets return undefined) - harness: pass a `linkComponent` so link buttons (RN ignores `href` on native) open other mock pages; remount `<Content>` per path so root state is fresh Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 7ff20ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
View your CI Pipeline Execution ↗ for commit 7ff20ef
💡 With Ultracache enabled, Nx Cloud learns each task's file inputs in CI and uses them on later runs. Turn on Ultracache in workspace settings ↗ · Read docs ↗ ☁️ Nx Cloud last updated this comment at |
The SDK's tsconfig lists `react-native` in `types`, but `@types/react-native`
was only installed transitively through `@types/react-native-video`, which was
removed with `react-native-video`. The type build then failed with TS2688
("Cannot find type definition file for 'react-native'").
Pin it to 0.72.x, the line it resolved to before (0.73 is a deprecation stub).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
This branch has not been deployed
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.
What
1. React 19 and the New Architecture on current React Native (
3cb48b3)react/react-dompeer range to^18.0.0 || ^19.0.0. React Native 0.78+ requires React 19, and 0.82+ always runs on the New Architecture (Fabric + bridgeless).react-native-video@5dependency. It is end-of-life and legacy-architecture only, and the Video block was never registered in this SDK, so its override is now a stub.packages/sdks/e2e/react-native-83-fabric: a native-only Expo SDK 55 / RN 0.83 / React 19.2 harness. It has a path picker, deep links (rn83fabric://<path>) and afabric= bridgeless= hermes=readout. It is not wired into the Playwright CI matrix.2. Click actions now run on native taps (
fa7a3de)onClick, andViewhas no tap handler, so Builder click actions never ran on native. Web already worked through RN Web.getEventHandlerNamemapsclicktoonPresson native.getBlockTaghelper makes blocks with a click action render as aPressableinstead of aViewon native. It lives insrc/functionsso Mitosis can resolve it; only the RN override does anything, and other targets returnundefinedand don't use it.App.tsxpasses alinkComponent, because RN ignoreshrefon native, so link buttons never navigate without one. It also remounts<Content>per path so rootdata.state/jsCodeare fresh.Verified (iOS simulator, RN 0.83, Fabric + bridgeless + Hermes)
/,/columns, symbols, data/state bindings, show/hide, accordion, tabs, A/B test, strict style mode./reactive-state: 3 taps give 3, so handlers don't fire twice./and/columns.yarn g:nx build @builder.io/sdk-react-native,yarn typecheck, eslint and prettier pass.Not verified / for reviewers
react-native-74/react-native-76-fabrichave not been run locally. CI should cover them.getBlockTagfromblock.lite.tsxbut don't use it. Check that tree-shaking or lint in those outputs is happy.transform-block-properties.tsimportsfindDOMNodefromreact-dom, which React 19 removed. This only affects the editing path.VirtualizedListwarning.@builder.io/react-native-render-html's podspec uses a scoped name that CocoaPods rejects. The harness works around it inreact-native.config.js.linkComponent. The SDK has no native default.🤖 Generated with Claude Code