Skip to content

Remove old architecture support after RN 0.87 update - #757

Open
NicooleT wants to merge 8 commits into
mainfrom
nicole/removeOldArch
Open

Remove old architecture support after RN 0.87 update#757
NicooleT wants to merge 8 commits into
mainfrom
nicole/removeOldArch

Conversation

@NicooleT

@NicooleT NicooleT commented Aug 18, 2026

Copy link
Copy Markdown

Summary

  • Removed Android Paper/old-architecture implementations, generated compatibility classes, architecture flags, and conditional source sets.
  • Enabled the React Native Gradle plugin and TurboModule metadata unconditionally.
  • Preserved Android React view props and moved required Fabric helpers into the main source set.
  • Updated Android event dispatching to the RN 0.87 API.
  • Removed legacy iOS views, managers, shadow views, local data, events, and the obsolete Xcode project.
  • Made the iOS Fabric components, C++ shadow nodes, and TurboModule implementation unconditional.
  • Removed old/new architecture switches from example projects, CI scripts, and the bug-report template.
  • Updated the pod lockfile for the New Architecture-only configuration.
  • Modernize new arch from fix: replace deep RN imports with public API #744

@NicooleT NicooleT self-assigned this Aug 18, 2026
@NicooleT
NicooleT marked this pull request as ready for review August 20, 2026 19:44
@janicduplessis

Copy link
Copy Markdown
Collaborator

Heads up on one thing that blocks the 0.82 floor we're planning for 6.x.

getEventDispatcher(context) doesn't exist before RN 0.85

SafeAreaProviderManager.kt#L40 calls the single-arg overload:

UIManagerHelper.getEventDispatcher(reactContext)

That overload landed in 0.85. In 0.82.1 — and in 0.83/0.84 — the only getEventDispatcher is the two-arg (ReactContext, @UIManagerType Int) form, so this is an unresolved-reference compile error on 0.82–0.84.

Suggested fix is the two-arg form rather than going back to getEventDispatcherForReactTag, which is @Deprecated as of 0.87. UIManagerType.FABRIC is public const val FABRIC: Int = 2 in every version 0.82→0.87, and Fabric is the only renderer here now:

import com.facebook.react.uimanager.common.UIManagerType
...
UIManagerHelper.getEventDispatcher(reactContext, UIManagerType.FABRIC)
    ?.dispatchEvent(InsetsChangeEvent(getSurfaceId(reactContext), reactTag, insets, frame))

Peer range

package.json#L59 is >=0.87.0 — should be >=0.82.0 for the intended floor. The compat table in docs/docs/getting-started.mdx also needs a 6.x | >= 0.82 row (it currently stops at 5.x | >= 0.75).

Everything else I checked is 0.82-safe

  • Gradle: configureBuildConfigFieldsForLibraries, configureNamespaceForLibraries, and the codegen sourceSets.main.java.srcDir(...) registration are all present in 0.82's ReactPlugin, so dropping buildConfig true, the manifest package attr, and the manual java.directories.add is fine at the floor.
  • ViewManager.updateState is still Java with the same @Nullable Object updateState(T, ReactStylesDiffMap, StateWrapper) signature; StateWrapper.updateState(WritableMap) and the 6-arg ReactModuleInfo constructor are identical across 0.82/0.87.
  • UIManagerHelper.getReactContext(view) / getSurfaceId(context) both exist in 0.82.
  • JS side is fine: CodegenTypes and codegenNativeComponent are both public exports in 0.82's types/index.d.ts, and consumer codegen ≥0.80 handles TSQualifiedName, so the spec rewrites from Update dependencies #753 don't push the floor up.
  • iOS/C++ are untouched apart from #ifdef removal and two header swaps — nothing version-sensitive.

Worth noting the example app and CI only run 0.87, so nothing currently exercises the floor — which is why this one slipped through. Some form of multi-version build in CI would catch this class of drift.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants