mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 22:10:14 +00:00
delete feature flag useSetNativePropsInNativeAnimationsInFabric
Summary: changelog: [internal] Reviewed By: dmytrorykun Differential Revision: D66230767 fbshipit-source-id: 8f133a313e42a5dc7136e88a3ce68835d420ced9
This commit is contained in:
parent
69400be4fc
commit
d2723b8ed7
@ -73,8 +73,6 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
||||
|
||||
const useNativePropsInFabric =
|
||||
ReactNativeFeatureFlags.shouldUseSetNativePropsInFabric();
|
||||
const useSetNativePropsInNativeAnimationsInFabric =
|
||||
ReactNativeFeatureFlags.shouldUseSetNativePropsInNativeAnimationsInFabric();
|
||||
|
||||
const useAnimatedPropsLifecycle =
|
||||
ReactNativeFeatureFlags.useInsertionEffectsForAnimations()
|
||||
@ -119,13 +117,8 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
||||
if (isFabricNode) {
|
||||
// Call `scheduleUpdate` to synchronise Fiber and Shadow tree.
|
||||
// Must not be called in Paper.
|
||||
if (useSetNativePropsInNativeAnimationsInFabric) {
|
||||
// $FlowFixMe[incompatible-use]
|
||||
instance.setNativeProps(node.__getAnimatedValue());
|
||||
} else {
|
||||
scheduleUpdate();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -201,12 +194,7 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
||||
}
|
||||
};
|
||||
},
|
||||
[
|
||||
node,
|
||||
useNativePropsInFabric,
|
||||
useSetNativePropsInNativeAnimationsInFabric,
|
||||
props,
|
||||
],
|
||||
[node, useNativePropsInFabric, props],
|
||||
);
|
||||
const callbackRef = useRefEffect<TInstance>(refEffect);
|
||||
|
||||
|
@ -554,15 +554,6 @@ const definitions: FeatureFlagDefinitions = {
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
},
|
||||
shouldUseSetNativePropsInNativeAnimationsInFabric: {
|
||||
defaultValue: false,
|
||||
metadata: {
|
||||
dateAdded: '2024-03-05',
|
||||
description:
|
||||
'Enables use of setNativeProps in Native driven animations in Fabric.',
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
},
|
||||
useInsertionEffectsForAnimations: {
|
||||
defaultValue: true,
|
||||
metadata: {
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<ce07f8091a19d5b479350f7a3b05067b>>
|
||||
* @generated SignedSource<<36e8036fd1f45794c37a6fa22cde9b05>>
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
@ -42,7 +42,6 @@ export type ReactNativeFeatureFlagsJsOnly = {
|
||||
shouldUseAnimatedObjectForTransform: Getter<boolean>,
|
||||
shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
|
||||
shouldUseSetNativePropsInFabric: Getter<boolean>,
|
||||
shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean>,
|
||||
useInsertionEffectsForAnimations: Getter<boolean>,
|
||||
useRefsForTextInputState: Getter<boolean>,
|
||||
};
|
||||
@ -174,11 +173,6 @@ export const shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean> = cre
|
||||
*/
|
||||
export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInFabric', true);
|
||||
|
||||
/**
|
||||
* Enables use of setNativeProps in Native driven animations in Fabric.
|
||||
*/
|
||||
export const shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInNativeAnimationsInFabric', false);
|
||||
|
||||
/**
|
||||
* Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user