mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove gating for AnimatedObject (#36934)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/36934 Embarrassingly, the check for ReactNativeFeatureFlags.isAnimatedObjectEnabled wasn't actually useful since it's a function...it's been working as expected, so remove this gating since it's not doing anything. Changelog: [Internal] - Remove gating for AnimatedObject Reviewed By: mdvacca Differential Revision: D45055855 fbshipit-source-id: c30b3c04efc0e919059dbcb75a5adfea90610b85
This commit is contained in:
committed by
Facebook GitHub Bot
parent
deb6b380b2
commit
07df82b4e1
@@ -12,7 +12,6 @@
|
||||
|
||||
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
||||
|
||||
import ReactNativeFeatureFlags from '../../ReactNative/ReactNativeFeatureFlags';
|
||||
import {findNodeHandle} from '../../ReactNative/RendererProxy';
|
||||
import {AnimatedEvent} from '../AnimatedEvent';
|
||||
import NativeAnimatedHelper from '../NativeAnimatedHelper';
|
||||
@@ -29,10 +28,7 @@ function createAnimatedProps(inputProps: Object): Object {
|
||||
props[key] = new AnimatedStyle(value);
|
||||
} else if (value instanceof AnimatedNode) {
|
||||
props[key] = value;
|
||||
} else if (
|
||||
ReactNativeFeatureFlags.isAnimatedObjectEnabled &&
|
||||
hasAnimatedNode(value)
|
||||
) {
|
||||
} else if (hasAnimatedNode(value)) {
|
||||
props[key] = new AnimatedObject(value);
|
||||
} else {
|
||||
props[key] = value;
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
||||
|
||||
import ReactNativeFeatureFlags from '../../ReactNative/ReactNativeFeatureFlags';
|
||||
import flattenStyle from '../../StyleSheet/flattenStyle';
|
||||
import Platform from '../../Utilities/Platform';
|
||||
import NativeAnimatedHelper from '../NativeAnimatedHelper';
|
||||
@@ -34,10 +33,7 @@ function createAnimatedStyle(
|
||||
animatedStyles[key] = new AnimatedTransform(value);
|
||||
} else if (value instanceof AnimatedNode) {
|
||||
animatedStyles[key] = value;
|
||||
} else if (
|
||||
ReactNativeFeatureFlags.isAnimatedObjectEnabled &&
|
||||
hasAnimatedNode(value)
|
||||
) {
|
||||
} else if (hasAnimatedNode(value)) {
|
||||
animatedStyles[key] = new AnimatedObject(value);
|
||||
} else if (keepUnanimatedValues) {
|
||||
animatedStyles[key] = value;
|
||||
|
||||
@@ -45,10 +45,6 @@ export type FeatureFlags = {|
|
||||
* Enables access to the host tree in Fabric using DOM-compatible APIs.
|
||||
*/
|
||||
enableAccessToHostTreeInFabric: () => boolean,
|
||||
/**
|
||||
* Enables animating object and array prop values.
|
||||
*/
|
||||
isAnimatedObjectEnabled: () => boolean,
|
||||
|};
|
||||
|
||||
const ReactNativeFeatureFlags: FeatureFlags = {
|
||||
@@ -59,7 +55,6 @@ const ReactNativeFeatureFlags: FeatureFlags = {
|
||||
animatedShouldUseSingleOp: () => false,
|
||||
isGlobalWebPerformanceLoggerEnabled: () => false,
|
||||
enableAccessToHostTreeInFabric: () => false,
|
||||
isAnimatedObjectEnabled: () => false,
|
||||
};
|
||||
|
||||
module.exports = ReactNativeFeatureFlags;
|
||||
|
||||
Reference in New Issue
Block a user