Skip to content

Commit bf2609d

Browse files
RSNarafacebook-github-bot
authored andcommitted
Make RCTNativeAnimatedModule into a TurboModule
Summary: D20831545 integrated TurboModules with the bridge's `onBatchComplete` event. This fixed the RCTNativeAnimatedModule jank, so I'm re-converting RCTNativeAnimatedModule into a TurboModule. Changelog: [iOS][Fixed] - Make RCTNativeAnimatedModule TM-compatible Reviewed By: PeteTheHeat Differential Revision: D20850744 fbshipit-source-id: bb85a1bb27963e7d39bf149d0a3d7b71c88175da
1 parent 432868b commit bf2609d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Libraries/NativeAnimation/RCTNativeAnimatedModule.mm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515

1616
typedef void (^AnimatedOperation)(RCTNativeAnimatedNodesManager *nodesManager);
1717

18+
@interface RCTNativeAnimatedModule() <NativeAnimatedModuleSpec>
19+
@end
20+
1821
@implementation RCTNativeAnimatedModule
1922
{
2023
RCTNativeAnimatedNodesManager *_nodesManager;
@@ -332,6 +335,14 @@ - (void)eventDispatcherWillDispatchEvent:(id<RCTEvent>)event
332335
});
333336
}
334337

338+
- (std::shared_ptr<facebook::react::TurboModule>)
339+
getTurboModuleWithJsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
340+
nativeInvoker:(std::shared_ptr<facebook::react::CallInvoker>)nativeInvoker
341+
perfLogger:(id<RCTTurboModulePerformanceLogger>)perfLogger
342+
{
343+
return std::make_shared<facebook::react::NativeAnimatedModuleSpecJSI>(self, jsInvoker, nativeInvoker, perfLogger);
344+
}
345+
335346
@end
336347

337348
Class RCTNativeAnimatedModuleCls(void) {

0 commit comments

Comments
 (0)