mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
basic useNativeDriver functionality
Summary: Not super clean, but not terrible. Unfortunately this still relies on the old Paper UIManager calling delegate methods to flush the operations queues. This will work for Marketplace You since Paper will be active, but we need to fix this, along with Animated Events which don't work at all yet. Random aside: it seems like taps are less responsive in fabric vs. paper, at least on iOS. There is a sporadic delay between the touches event coming in nativly to the JS callback invoking the native module function to start the animation - this will need some debugging. Reviewed By: shergin Differential Revision: D14143331 fbshipit-source-id: 63a17eaafa1217d77a532a2716d9f886a96fae59
This commit is contained in:
1 parent
53e15c9e95
commit
ea54ceca13
14 files changed
+119
-28
No files matched your search
@@ -41,12 +41,12 @@ RCT_EXPORT_MODULE();
|
||||
{
|
||||
[super setBridge:bridge];
|
||||
|
||||
_nodesManager = [[RCTNativeAnimatedNodesManager alloc] initWithUIManager:self.bridge.uiManager];
|
||||
_nodesManager = [[RCTNativeAnimatedNodesManager alloc] initWithBridge:self.bridge];
|
||||
_operations = [NSMutableArray new];
|
||||
_preOperations = [NSMutableArray new];
|
||||
|
||||
[bridge.eventDispatcher addDispatchObserver:self];
|
||||
[bridge.uiManager.observerCoordinator addObserver:self];
|
||||
[bridge.uiManager.observerCoordinator addObserver:self]; // TODO: add fabric equivalent?
|
||||
}
|
||||
|
||||
#pragma mark -- API
|
||||
@@ -196,7 +196,7 @@ RCT_EXPORT_METHOD(removeAnimatedEventFromView:(nonnull NSNumber *)viewTag
|
||||
|
||||
#pragma mark - RCTUIManagerObserver
|
||||
|
||||
- (void)uiManagerWillPerformMounting:(RCTUIManager *)uiManager
|
||||
- (void)uiManagerWillPerformMounting:(RCTUIManager *)uiManager // TODO: need fabric equivalent
|
||||
{
|
||||
if (_preOperations.count == 0 && _operations.count == 0) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user