Resolve $FlowFixMe in Pressable (#44634)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44634

Changelog: [Internal]

As per title.

Reviewed By: NickGerleman

Differential Revision: D57612982

fbshipit-source-id: 5aafd38889b3db49a5f4360563e1803169d9b943
This commit is contained in:
Fabrizio Cucci
2024-05-21 07:40:51 -07:00
committed by Facebook GitHub Bot
parent e67d5560cf
commit cf94797f93
@@ -195,13 +195,16 @@ type Props = $ReadOnly<{|
'aria-label'?: ?string,
|}>;
type Instance = React.ElementRef<typeof View>;
/**
* Component used to build display components that should respond to whether the
* component is currently pressed or not.
*/
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
* LTI update could not be added via codemod */
function Pressable(props: Props, forwardedRef): React.Node {
function Pressable(
props: Props,
forwardedRef: React.RefSetter<Instance>,
): React.Node {
const {
accessible,
accessibilityState,
@@ -235,7 +238,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
...restProps
} = props;
const viewRef = useRef<React.ElementRef<typeof View> | null>(null);
const viewRef = useRef<Instance | null>(null);
const mergedRef = useMergeRefs(forwardedRef, viewRef);
const android_rippleConfig = useAndroidRippleForView(android_ripple, viewRef);