feat(react-native)!: support only the New Architecture (RN ≥ 0.84, React ≥ 19.2)#140
Open
istarkov wants to merge 1 commit into
Open
feat(react-native)!: support only the New Architecture (RN ≥ 0.84, React ≥ 19.2)#140istarkov wants to merge 1 commit into
istarkov wants to merge 1 commit into
Conversation
…eact >= 19.2) Drop all old-architecture (Paper/Bridge) code paths, aligning support with the officially supported React Native versions (https://reactnative.dev/versions). - JS: remove IS_FABRIC detection, the old-arch JS self-sizing pass, and the legacy TextAncestor require fallback - Android: delete src/oldarch, merge src/newarch into src/main, Fabric-only build.gradle that fails clearly when newArchEnabled is not true, hardcode isTurboModule=true (BuildConfig flag removed) - iOS: remove RCT_NEW_ARCH_ENABLED conditionals, old-arch Bridge view managers and their headers, and the KVC dictionary event blocks; guard RaTeXColorUtils.h with __cplusplus for the CocoaPods umbrella header - package.json: peerDependencies react >= 19.2.0, react-native >= 0.84.0; dev deps bumped to RN 0.84 / React 19.2.3 - Docs: READMEs (en/zh) now state New Architecture only, RN >= 0.84 - demo/react-native stays on RN 0.81 (react-native-macos ceiling) via legacy-peer-deps, documented in its README Verified: tsc build/typecheck; Expo demo (RN 0.86) built from clean pods and run on iOS simulator and Android emulator — all repro cases render (32/32). Claude-Session: https://claude.ai/code/session_0199VHXadcpUUKuayJWFyR1U
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
ref #139 (comment)
Drops all old-architecture (Paper/Bridge) support from
ratex-react-native, aligning the package with the officially supported React Native versions (0.84 / 0.85 / 0.86). Only the New Architecture (Fabric / TurboModules / Codegen) — enabled by default in all supported versions — is supported from now on.Breaking change: peer dependencies are now
react-native >= 0.84.0andreact >= 19.2.0(RN 0.84 requires React ^19.2.3).Changes
JS
IS_FABRICruntime detection and the old-arch JS self-sizing pass inRaTeXView(Fabric self-sizes via the shadow node;onContentSizeChangeis now forwarded directly).require('react-native/Libraries/Text/TextAncestor')fallback —unstable_TextAncestorContextexists in all supported RN versions.Android
src/oldarch/; mergedsrc/newarch/intosrc/main/(the split had no purpose left).build.gradleis Fabric-only and fails with a clearGradleExceptionwhennewArchEnabledis nottrue.RaTeXPackagehardcodesisTurboModule = true; theIS_NEW_ARCHITECTURE_ENABLEDbuildConfig flag is gone.iOS
RCT_NEW_ARCH_ENABLEDconditionals, the old-arch Bridge view managers (RCT_EXPORT_MODULE/RCT_EXPORT_VIEW_PROPERTYsections) and their headers.onError/onContentSizeChange) that existed only for the old-arch bridge — Fabric callbacks (setErrorCallback/setContentSizeCallback) are the single event path now.RaTeXColorUtils.his now guarded with#ifdef __cplusplus(previously kept inert in the CocoaPods umbrella header by theRCT_NEW_ARCH_ENABLEDguard).Docs / demos
demo/react-nativestays pinned to RN 0.81 + react-native-macos 0.81 (the newest react-native-macos release) and installs withlegacy-peer-deps(.npmrc); the README documents the constraint and the upgrade path. It runs the New Architecture, so the library works there.Verification
tscbuild + typecheck against React 19.2 types.$…$, baseline alignment, first-commituseLayoutEffectmeasure, and the detach-cancel repro all pass (rendered 32/32, 0 errors) on both platforms.