Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#import <React/RCTLog.h>
#import <React/RCTUtils.h>
#import <cxxreact/TraceSection.h>
#import <react/featureflags/ReactNativeFeatureFlags.h>
#import <react/renderer/components/root/RootShadowNode.h>
#import <react/renderer/core/LayoutableShadowNode.h>
#import <react/renderer/core/RawProps.h>
Expand Down Expand Up @@ -286,7 +287,6 @@ - (void)synchronouslyUpdateViewOnUIThread:(ReactTag)reactTag
componentDescriptor:(const ComponentDescriptor &)componentDescriptor
{
RCTAssertMainQueue();
NSArray<NSString *> *propsKeysToBeUpdated = extractKeysFromFollyDynamic(props);
bool updatesTransform = props.find("transform") != props.items().end();
bool updatesOpacity = props.find("opacity") != props.items().end();

Expand All @@ -296,13 +296,18 @@ - (void)synchronouslyUpdateViewOnUIThread:(ReactTag)reactTag
return;
}

NSSet<NSString *> *propKeys = componentView.propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN ?: [NSSet new];

if (!ReactNativeFeatureFlags::useSharedAnimatedBackend()) {
NSArray<NSString *> *propsKeysToBeUpdated = extractKeysFromFollyDynamic(props);
propKeys = [propKeys setByAddingObjectsFromArray:propsKeysToBeUpdated];
}

SurfaceId surfaceId = RCTSurfaceIdForView(componentView);
Props::Shared oldProps = [componentView props];
Props::Shared newProps = componentDescriptor.cloneProps(
PropsParserContext{surfaceId, *_contextContainer}, oldProps, RawProps(std::move(props)));

NSSet<NSString *> *propKeys = componentView.propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN ?: [NSSet new];
propKeys = [propKeys setByAddingObjectsFromArray:propsKeysToBeUpdated];
componentView.propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN = nil;
[componentView updateProps:newProps oldProps:oldProps];
componentView.propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN = propKeys;
Expand Down
Loading