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 =
|
const useNativePropsInFabric =
|
||||||
ReactNativeFeatureFlags.shouldUseSetNativePropsInFabric();
|
ReactNativeFeatureFlags.shouldUseSetNativePropsInFabric();
|
||||||
const useSetNativePropsInNativeAnimationsInFabric =
|
|
||||||
ReactNativeFeatureFlags.shouldUseSetNativePropsInNativeAnimationsInFabric();
|
|
||||||
|
|
||||||
const useAnimatedPropsLifecycle =
|
const useAnimatedPropsLifecycle =
|
||||||
ReactNativeFeatureFlags.useInsertionEffectsForAnimations()
|
ReactNativeFeatureFlags.useInsertionEffectsForAnimations()
|
||||||
@ -119,12 +117,7 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
|||||||
if (isFabricNode) {
|
if (isFabricNode) {
|
||||||
// Call `scheduleUpdate` to synchronise Fiber and Shadow tree.
|
// Call `scheduleUpdate` to synchronise Fiber and Shadow tree.
|
||||||
// Must not be called in Paper.
|
// Must not be called in Paper.
|
||||||
if (useSetNativePropsInNativeAnimationsInFabric) {
|
scheduleUpdate();
|
||||||
// $FlowFixMe[incompatible-use]
|
|
||||||
instance.setNativeProps(node.__getAnimatedValue());
|
|
||||||
} else {
|
|
||||||
scheduleUpdate();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -201,12 +194,7 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
[
|
[node, useNativePropsInFabric, props],
|
||||||
node,
|
|
||||||
useNativePropsInFabric,
|
|
||||||
useSetNativePropsInNativeAnimationsInFabric,
|
|
||||||
props,
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
const callbackRef = useRefEffect<TInstance>(refEffect);
|
const callbackRef = useRefEffect<TInstance>(refEffect);
|
||||||
|
|
||||||
|
@ -554,15 +554,6 @@ const definitions: FeatureFlagDefinitions = {
|
|||||||
purpose: 'experimentation',
|
purpose: 'experimentation',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
shouldUseSetNativePropsInNativeAnimationsInFabric: {
|
|
||||||
defaultValue: false,
|
|
||||||
metadata: {
|
|
||||||
dateAdded: '2024-03-05',
|
|
||||||
description:
|
|
||||||
'Enables use of setNativeProps in Native driven animations in Fabric.',
|
|
||||||
purpose: 'experimentation',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
useInsertionEffectsForAnimations: {
|
useInsertionEffectsForAnimations: {
|
||||||
defaultValue: true,
|
defaultValue: true,
|
||||||
metadata: {
|
metadata: {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*
|
*
|
||||||
* @generated SignedSource<<ce07f8091a19d5b479350f7a3b05067b>>
|
* @generated SignedSource<<36e8036fd1f45794c37a6fa22cde9b05>>
|
||||||
* @flow strict
|
* @flow strict
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -42,7 +42,6 @@ export type ReactNativeFeatureFlagsJsOnly = {
|
|||||||
shouldUseAnimatedObjectForTransform: Getter<boolean>,
|
shouldUseAnimatedObjectForTransform: Getter<boolean>,
|
||||||
shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
|
shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
|
||||||
shouldUseSetNativePropsInFabric: Getter<boolean>,
|
shouldUseSetNativePropsInFabric: Getter<boolean>,
|
||||||
shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean>,
|
|
||||||
useInsertionEffectsForAnimations: Getter<boolean>,
|
useInsertionEffectsForAnimations: Getter<boolean>,
|
||||||
useRefsForTextInputState: Getter<boolean>,
|
useRefsForTextInputState: Getter<boolean>,
|
||||||
};
|
};
|
||||||
@ -174,11 +173,6 @@ export const shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean> = cre
|
|||||||
*/
|
*/
|
||||||
export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInFabric', true);
|
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`.
|
* Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user