Skip to content

Commit e3f6ffc

Browse files
zeyapfacebook-github-bot
authored andcommitted
Allowlist yoga dimension/position if useSharedAnimatedBackend featureflag is enabled (#56375)
Summary: ## Changelog: [Internal] [Changed] - Allowlist yoga dimension/position/flex if useSharedAnimatedBackend featureflag is enabled These are the most well tested yoga props in animation, will add more after we verify they work Reviewed By: cortinico Differential Revision: D100026348
1 parent 7ee893d commit e3f6ffc

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

packages/react-native/Libraries/Animated/NativeAnimatedAllowlist.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,27 @@ const SUPPORTED_STYLES: {[string]: true} = {
5959
scaleY: true,
6060
translateX: true,
6161
translateY: true,
62+
// eslint-disable-next-line react-hooks/rules-of-hooks
63+
...(ReactNativeFeatureFlags.useSharedAnimatedBackend()
64+
? {
65+
/* dimension */
66+
height: true,
67+
maxHeight: true,
68+
maxWidth: true,
69+
minHeight: true,
70+
minWidth: true,
71+
width: true,
72+
/* position */
73+
bottom: true,
74+
end: true,
75+
left: true,
76+
right: true,
77+
start: true,
78+
top: true,
79+
/* flex */
80+
flex: true,
81+
}
82+
: {}),
6283
};
6384

6485
const SUPPORTED_TRANSFORMS: {[string]: true} = {

0 commit comments

Comments
 (0)