Skip to content

Commit 1bb94ce

Browse files
authored
Upgrade Flow in fbsource (#60485)
Summary: Changelog: [Internal] Reviewed By: panagosg7 Differential Revision: D135655324 Pull Request resolved: #60485
1 parent 0154307 commit 1bb94ce

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

  • packages/react-native/Libraries/Components/Pressable
  • private/react-native-fantom/src

‎packages/react-native/Libraries/Components/Pressable/Pressable.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,10 @@ function Pressable({
362362
ref={mergedRef}
363363
style={typeof style === 'function' ? style({pressed}) : style}
364364
collapsable={false}>
365-
{typeof children === 'function' ? children({pressed}) : children}
365+
{
366+
// $FlowFixMe[incompatible-use]
367+
typeof children === 'function' ? children({pressed}) : children
368+
}
366369
{__DEV__ ? <PressabilityDebugView color="red" hitSlop={hitSlop} /> : null}
367370
</View>
368371
);

‎private/react-native-fantom/src/index.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,11 @@ export function getDefinedEventHandlers(
372372
return [];
373373
}
374374
// WARNING: This uses React private API (fiber internals).
375-
const memoizedProps = (
376-
instanceHandle as {memoizedProps?: {[key: string]: unknown}}
377-
).memoizedProps;
375+
const memoizedProps = // $FlowFixMe[incompatible-indexer]
376+
// $FlowFixMe[incompatible-variance]
377+
// $FlowFixMe[incompatible-type]
378+
(instanceHandle as {memoizedProps?: {[key: string]: unknown}})
379+
.memoizedProps;
378380
if (memoizedProps == null) {
379381
return [];
380382
}

0 commit comments

Comments
 (0)