diff --git a/lib/shared/markdown.js b/lib/shared/markdown.js --- a/lib/shared/markdown.js +++ b/lib/shared/markdown.js @@ -45,8 +45,8 @@ prevCapture: string, ) => ?Capture); -export type ReactElement = React$Element; -type ReactElements = React.Node; +export type ReactElement = React.MixedElement; +type ReactElements = React.MixedElement; export type Output = (node: ASTNode, state?: ?State) => Result; diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js --- a/native/account/logged-out-modal.react.js +++ b/native/account/logged-out-modal.react.js @@ -439,7 +439,7 @@ return null; } - const signInButtons: Array> = []; + const signInButtons: Array = []; if (!usingRestoreFlow) { signInButtons.push( { +): React.MixedElement { const text = entryText === '' ? ' ' : entryText; return ( diff --git a/native/chat/inline-engagement.react.js b/native/chat/inline-engagement.react.js --- a/native/chat/inline-engagement.react.js +++ b/native/chat/inline-engagement.react.js @@ -35,7 +35,7 @@ sidebarInfo: ?ThreadInfo, reactions: ReactionInfo, deleted: boolean, -): React.Element { +): React.MixedElement { return ( { +): React.MixedElement { return ( diff --git a/native/chat/inner-text-message.react.js b/native/chat/inner-text-message.react.js --- a/native/chat/inner-text-message.react.js +++ b/native/chat/inner-text-message.react.js @@ -32,7 +32,7 @@ sidebarInfo: ?ThreadInfo, reactions: ReactionInfo, deleted: boolean, -): React.Element { +): React.MixedElement { return ( {text} diff --git a/native/chat/swipeable-message.react.js b/native/chat/swipeable-message.react.js --- a/native/chat/swipeable-message.react.js +++ b/native/chat/swipeable-message.react.js @@ -1,6 +1,5 @@ // @flow -import type { IconProps } from '@expo/vector-icons'; import * as Haptics from 'expo-haptics'; import * as React from 'react'; import { View } from 'react-native'; @@ -86,17 +85,15 @@ return interpolate(translateX, [0, 80, 120, 130], [0, 30, 120, 130]); } -type SwipeSnakeProps = { +type SwipeSnakeProps = { +isViewer: boolean, +translateX: SharedValue, +color: string, - +children: React.Element>>, + +children: React.MixedElement, +opacityInterpolator?: number => number, // must be worklet +translateXInterpolator?: number => number, // must be worklet }; -function SwipeSnake( - props: SwipeSnakeProps, -): React.Node { +function SwipeSnake(props: SwipeSnakeProps): React.Node { const { translateX, isViewer, opacityInterpolator, translateXInterpolator } = props; const transformStyle = useAnimatedStyle(() => { @@ -146,6 +143,7 @@ : colors.light.listForegroundLabel; const coloredIcon = React.useMemo( () => + // $FlowFixMe[incompatible-call] React.cloneElement(children, { color: iconColor, }), diff --git a/native/components/node-height-measurer.react.js b/native/components/node-height-measurer.react.js --- a/native/components/node-height-measurer.react.js +++ b/native/components/node-height-measurer.react.js @@ -50,7 +50,7 @@ // These are the dummies currently being rendered currentlyMeasuring: $ReadOnlyArray<{ +measureKey: string, - +dummy: React.Element, + +dummy: React.MixedElement, }>, // When certain parameters change we need to remeasure everything. In order to // avoid considering any onLayouts that got queued before we issued the @@ -504,10 +504,11 @@ render(): React.Node { const { currentlyMeasuring, iteration } = this.state; const dummies = currentlyMeasuring.map(({ measureKey, dummy }) => { - const { children } = dummy.props; - const style = [dummy.props.style, styles.dummy]; + const { children } = (dummy as any).props; + const style = [(dummy as any).props.style, styles.dummy]; const onLayout = (event: LayoutChangeEvent) => this.onDummyLayout(measureKey, iteration, event); + // $FlowFixMe[incompatible-call] const node = React.cloneElement(dummy, { style, onLayout, diff --git a/web/navigation-panels/navigation-panel.react.js b/web/navigation-panels/navigation-panel.react.js --- a/web/navigation-panels/navigation-panel.react.js +++ b/web/navigation-panels/navigation-panel.react.js @@ -20,7 +20,7 @@ type NavigationPanelContainerProps = { +tabSelector: AppState => T, - +children: React.ChildrenArray>, + +children: React.ChildrenArray, +horizontal?: boolean, }; @@ -33,7 +33,7 @@ const items = React.useMemo( () => - React.Children.map(children, child => { + React.Children.map(children, (child: any) => { if (!child) { return null; }