diff --git a/Libraries/Animation/RCTAnimationExperimentalManager.m b/Libraries/Animation/RCTAnimationExperimentalManager.m index 6bcda39ae..13c3f079a 100644 --- a/Libraries/Animation/RCTAnimationExperimentalManager.m +++ b/Libraries/Animation/RCTAnimationExperimentalManager.m @@ -235,7 +235,6 @@ RCT_EXPORT_METHOD(startAnimation:(NSNumber *)reactTag @try { [view.layer setValue:toValue forKey:keypath]; NSString *animationKey = [@"RCT" stringByAppendingString:RCTJSONStringify(@{@"tag": animationTag, @"key": keypath}, nil)]; - [view.layer addAnimation:animation forKey:animationKey]; if (!completionBlockSet) { strongSelf->_callbackRegistry[animationTag] = callback; [CATransaction setCompletionBlock:^{ @@ -247,6 +246,7 @@ RCT_EXPORT_METHOD(startAnimation:(NSNumber *)reactTag }]; completionBlockSet = YES; } + [view.layer addAnimation:animation forKey:animationKey]; } @catch (NSException *exception) { return RCTInvalidAnimationProp(strongSelf->_callbackRegistry, animationTag, keypath, toValue);