Skip to content

react-native.config.js missing from published npm package — SharedTransitionBoundary never registered on Android #9943

Description

@kaloudis

Description

react-native.config.js (in the repo since #9435) registers REASharedTransitionBoundaryComponentDescriptor for Android autolinking — but it's missing from the published npm tarball because the files whitelist in package.json doesn't include it (still true on main).

Without it, the boundary falls back to the legacy ViewManager interop path, whose shadow node never runs initialize() to unset ForceFlattenView. Since the boundary uses display: contents, it gets flattened out of the ShadowTree, the SET proxy never sees it in mutations, and shared element transitions silently never run on Android for npm installs. Verified on-device (RN 0.86, Fabric) by logging the proxy's light tree: zero boundary nodes ever appear. Restoring the file fixes it.

The monorepo example apps don't consume the npm tarball, which is likely why this isn't visible in your testing. Note for verification: the Gradle autolinking cache only keys on root config shas, so android/build/generated/autolinking/ must be deleted after adding the file to an existing checkout.

Steps to reproduce

npm pack react-native-reanimated@4.5.1 && tar -tzf react-native-reanimated-4.5.1.tgz | grep react-native.config
# → no match (same for 4.5.0)

Snack or a link to a repository

The command above demonstrates the defect without an app; can provide a runtime repro repo if useful.

Reanimated version

4.5.0, 4.5.1

React Native version

0.86.0

Platforms

Android

Metadata

Metadata

Labels

Missing reproThis issue need minimum repro scenarioPlatform: AndroidThis issue is specific to Android

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions