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:
Genki Kondo
2023-04-18 02:39:36 -07:00
committed by Facebook GitHub Bot
parent deb6b380b2
commit 07df82b4e1
3 changed files with 2 additions and 15 deletions
@@ -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;