Commit fe8f0fb
Apply Animated initialProps handling to Fabric only (#34927)
Summary:
Pull Request resolved: #34927
The changes made in D36902220 (a041951) and D36958882 (d8c25ca) attempted to reduce flickering and consistency issues when using Animated.
In the old renderer, we explicitly reset all animated props, and wait for the subsequent React commit to set the props to the right state, but if `initialProps` are used, the React reconciliation may not be able to identify the prop-update is required and will leave out the value. This behaviour is different in the new renderer, where we do not explicitly `restoreDefaultValues` on detaching the animated node, and instead rely on the latest state being correct(?).
Changelog:
[General][Fixed] Stop styles from being reset when detaching Animated.Values in old renderer
Fixes #34665
Reviewed By: rshest
Differential Revision: D40194072
fbshipit-source-id: 1b3fb1d1f4a39036a501a8a21e57002035dd5659
# Conflicts:
# Libraries/Animated/createAnimatedComponent.js1 parent 37790e4 commit fe8f0fb
File tree
3 files changed
+18
-17
lines changed- Libraries/Animated
- nodes
- ReactAndroid/src/main/java/com/facebook/react/animated
3 files changed
+18
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
204 | 211 | | |
205 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
206 | 217 | | |
207 | 218 | | |
208 | 219 | | |
209 | 220 | | |
210 | 221 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | 222 | | |
216 | 223 | | |
217 | 224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 49 | + | |
52 | 50 | | |
53 | 51 | | |
54 | 52 | | |
| |||
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
871 | 871 | | |
872 | 872 | | |
873 | 873 | | |
874 | | - | |
| 874 | + | |
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
| |||
883 | 883 | | |
884 | 884 | | |
885 | 885 | | |
886 | | - | |
| 886 | + | |
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
| |||
897 | 897 | | |
898 | 898 | | |
899 | 899 | | |
900 | | - | |
901 | | - | |
| 900 | + | |
902 | 901 | | |
903 | 902 | | |
904 | 903 | | |
905 | 904 | | |
906 | 905 | | |
907 | 906 | | |
908 | 907 | | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
| 908 | + | |
913 | 909 | | |
914 | 910 | | |
915 | 911 | | |
| |||
0 commit comments