mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Disable restoreDefaultValues in Native Animated in Fabric
Summary: Changelog: [Internal] # Problem Before every update, restoreDefaults is called on animated nodes. In paper this makes sure no stale properties are on animated nodes. In paper it works fine because restoreDefaults is called before mounting and animations are triggered after mounting within single commit. Details: https://github.com/facebook/react-native/pull/11819 In Fabric however it is called outside of other mounting operations and it applies default values to the view and then re-applies animated values. Reviewed By: JoshuaGross Differential Revision: D21786765 fbshipit-source-id: a2cb6d6d9cbd39d4c403c97c2f51e7d92078102f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a4757d2823
commit
163ec924fb
@@ -75,6 +75,11 @@
|
||||
|
||||
- (void)restoreDefaultValues
|
||||
{
|
||||
if (_managedByFabric) {
|
||||
// Restoring to default values causes render of inconsistent state
|
||||
// to the user because it isn't synchonised with Fabric's UIManager.
|
||||
return;
|
||||
}
|
||||
// Restore the default value for all props that were modified by this node.
|
||||
for (NSString *key in _propsDictionary.allKeys) {
|
||||
_propsDictionary[key] = [NSNull null];
|
||||
|
||||
Reference in New Issue
Block a user