Skip to content

Commit c774cb8

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
Remove unwanted animations
Summary: Changelog: [internal] # Problem Assigning `CALayer.contents` implicitly animates the difference. As we keep `UIView` in recycle pool between usages, they keep their previous state. This was causing animation of border when the views were being reused. # Solution Wrapping application of mutations in `CATTransaction`. Reviewed By: shergin Differential Revision: D20442045 fbshipit-source-id: 214d6c422f23f399dec46b5bf1a38a7b64758160
1 parent 66e7a4c commit c774cb8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

React/Fabric/Mounting/RCTMountingManager.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ static void RNPerformMountInstructions(
135135
{
136136
SystraceSection s("RNPerformMountInstructions");
137137

138+
[CATransaction begin];
139+
[CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions];
138140
for (auto const &mutation : mutations) {
139141
switch (mutation.type) {
140142
case ShadowViewMutation::Create: {
@@ -189,6 +191,7 @@ static void RNPerformMountInstructions(
189191
}
190192
}
191193
}
194+
[CATransaction commit];
192195
}
193196

194197
@implementation RCTMountingManager {

0 commit comments

Comments
 (0)