Skip to content

Add c++ AnimatedModule to DefaultTurboModules#55729

Closed
zeyap wants to merge 1 commit into
react:mainfrom
zeyap:export-D94244698
Closed

Add c++ AnimatedModule to DefaultTurboModules#55729
zeyap wants to merge 1 commit into
react:mainfrom
zeyap:export-D94244698

Conversation

@zeyap

@zeyap zeyap commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

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

Differential Revision: D94244698

@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 Feb 24, 2026
@meta-codesync

meta-codesync Bot commented Feb 24, 2026

Copy link
Copy Markdown

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

@zeyap zeyap force-pushed the export-D94244698 branch 20 times, most recently from 03f2c3f to be55270 Compare March 3, 2026 16:17
@zeyap zeyap force-pushed the export-D94244698 branch from be55270 to 447acad Compare March 4, 2026 14:06
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
@zeyap zeyap force-pushed the export-D94244698 branch from 447acad to 986559c Compare March 4, 2026 14:11
@meta-codesync meta-codesync Bot closed this in 15e52e3 Mar 4, 2026
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @zeyap in 15e52e3

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Mar 4, 2026
alanleedev pushed a commit that referenced this pull request Mar 9, 2026
Summary:
Pull Request resolved: #55729

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

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

Reviewed By: NickGerleman

Differential Revision: D94244698

fbshipit-source-id: 09e905eb4bad7d03cdf87d5b47352060b0e6212f
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 Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

3 participants