Skip to content

move DefaultTurboModules::get to end of TurboModuleManager#55852

Open
zeyap wants to merge 2 commits intofacebook:mainfrom
zeyap:export-D94907092
Open

move DefaultTurboModules::get to end of TurboModuleManager#55852
zeyap wants to merge 2 commits intofacebook:mainfrom
zeyap:export-D94907092

Conversation

@zeyap
Copy link
Contributor

@zeyap zeyap commented Mar 2, 2026

Summary:

Changelog:

[General] [Changed] - move DefaultTurboModules::get to end of TurboModuleManager

To align with android/ios; so that the logic before it can override default behavior

Differential Revision: D94907092

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 2, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 2, 2026

@zeyap has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94907092.

zeyap added a commit to zeyap/react-native that referenced this pull request Mar 2, 2026
…55852)

Summary:

## Changelog:

[General] [Changed] - move DefaultTurboModules::get to end of TurboModuleManager

To align with android/ios; so that the logic before it can override default behavior

Differential Revision: D94907092
@zeyap zeyap force-pushed the export-D94907092 branch from ded4c3e to 01c98fa Compare March 2, 2026 15:12
zeyap added a commit to zeyap/react-native that referenced this pull request Mar 2, 2026
…55852)

Summary:

## Changelog:

[General] [Changed] - move DefaultTurboModules::get to end of TurboModuleManager

To align with android/ios; so that the logic before it can override default behavior

Differential Revision: D94907092
@zeyap zeyap force-pushed the export-D94907092 branch from 01c98fa to 53efd8c Compare March 2, 2026 15:13
zeyap added a commit to zeyap/react-native that referenced this pull request Mar 2, 2026
…55852)

Summary:
Pull Request resolved: facebook#55852

## Changelog:

[General] [Changed] - move DefaultTurboModules::get to end of TurboModuleManager

To align with android/ios; so that the logic before it can override default behavior

Differential Revision: D94907092
@zeyap zeyap force-pushed the export-D94907092 branch from 53efd8c to 6b9fd3d Compare March 2, 2026 15:17
zeyap added 2 commits March 2, 2026 08:29
Summary:

This is added so that one can easily enables c++ AnimatedModule in open source.

If an app doesn't use `RCTAnimatedModuleProvider`(ios) or `AnimatedCxxReactPackage`(android), it can fallback to this default AnimatedModule when it has both c++animated and shared backend enabled
- shared backend removes the need to pass down start/stop callbacks to NativeAnimatedNodesManagerProvider, so we can cleanly initialize it as static default
  -  RCTAnimatedModuleProvider uses the version of AnimatedModule that still relies on a dedicated CADisplayLink for start/stop
  - AnimatedCxxReactPackage also bundles internal ViewEventModule (for NativeViewEvents) that shares `NativeAnimatedNodesManagerProvider` with AnimatedModule, but NativeViewEvents is not needed for open source
    - Alternatively we could also expose `NativeAnimatedNodesManagerProvider` via UIManager so other turbomodules can also use it. However I don't think it makes sense to double down on another animation API on UIManager given we have shared backend.
- This assumes DefaultTurboModules is always the fallback module provider. So it'll not override when app already uses RCTAnimatedModuleProvider or AnimatedCxxReactPackage

## Changelog:

[General] [Added] - Add c++ AnimatedModule to DefaultTurboModules

Reviewed By: NickGerleman

Differential Revision: D94244698
…55852)

Summary:

## Changelog:

[General] [Changed] - move DefaultTurboModules::get to end of TurboModuleManager

To align with android/ios; so that the logic before it can override default behavior

Reviewed By: christophpurrer

Differential Revision: D94907092
@zeyap zeyap force-pushed the export-D94907092 branch from 6b9fd3d to 34239bd Compare March 2, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants