Skip to content

Commit

Permalink
[iOS] Fabric: clean up oldChildShadowView when handle Insert mount
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwuzw committed Oct 23, 2023
1 parent e8a0f0d commit 98fd7da
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ static void RCTPerformMountInstructions(
}

case ShadowViewMutation::Insert: {
auto &oldChildShadowView = mutation.oldChildShadowView;
auto &newChildShadowView = mutation.newChildShadowView;
auto &parentShadowView = mutation.parentShadowView;
auto &newChildViewDescriptor = [registry componentViewDescriptorWithTag:newChildShadowView.tag];
Expand All @@ -83,11 +82,11 @@ static void RCTPerformMountInstructions(

RCTAssert(newChildShadowView.props, @"`newChildShadowView.props` must not be null.");

[newChildComponentView updateProps:newChildShadowView.props oldProps:oldChildShadowView.props];
[newChildComponentView updateProps:newChildShadowView.props oldProps:nullptr];
[newChildComponentView updateEventEmitter:newChildShadowView.eventEmitter];
[newChildComponentView updateState:newChildShadowView.state oldState:oldChildShadowView.state];
[newChildComponentView updateState:newChildShadowView.state oldState:nullptr];
[newChildComponentView updateLayoutMetrics:newChildShadowView.layoutMetrics
oldLayoutMetrics:oldChildShadowView.layoutMetrics];
oldLayoutMetrics:EmptyLayoutMetrics];
[newChildComponentView finalizeUpdates:RNComponentViewUpdateMaskAll];

[parentViewDescriptor.view mountChildComponentView:newChildComponentView index:mutation.index];
Expand Down

0 comments on commit 98fd7da

Please sign in to comment.