File tree Expand file tree Collapse file tree
packages/react-native/Libraries/Components/Pressable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,13 +195,16 @@ type Props = $ReadOnly<{|
195195 'aria-label' ?: ?string ,
196196| } > ;
197197
198+ type Instance = React . ElementRef < typeof View > ;
199+
198200/**
199201 * Component used to build display components that should respond to whether the
200202 * component is currently pressed or not.
201203 */
202- /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
203- * LTI update could not be added via codemod */
204- function Pressable ( props : Props , forwardedRef ) : React . Node {
204+ function Pressable (
205+ props : Props ,
206+ forwardedRef : React . RefSetter < Instance > ,
207+ ) : React . Node {
205208 const {
206209 accessible,
207210 accessibilityState,
@@ -235,7 +238,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
235238 ...restProps
236239 } = props ;
237240
238- const viewRef = useRef < React . ElementRef < typeof View > | null > ( null ) ;
241+ const viewRef = useRef < Instance | null > ( null ) ;
239242 const mergedRef = useMergeRefs ( forwardedRef , viewRef ) ;
240243
241244 const android_rippleConfig = useAndroidRippleForView ( android_ripple , viewRef ) ;
You can’t perform that action at this time.
0 commit comments