You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
react-native-webview libdef: Use React$Element with required type argument
This fixes one of the things Flow glosses over and would catch when
we migrate this to a .js.flow file, with an error like this:
Cannot use `React.Element` [1] without 1 type argument.
[missing-type-arg]
Without having a particular type in mind to pass, just use the
highest, most general type allowed. See definition [1]:
/**
* Type of a React element. React elements are commonly created using JSX
* literals, which desugar to React.createElement calls (see below).
*/
declare type React$Element<+ElementType: React$ElementType> = {|
+type: ElementType,
+props: React$ElementProps<ElementType>,
+key: React$Key | null,
+ref: any,
|};
[1] https://github.com/facebook/flow/blob/v0.141.0/lib/react.js#L174-L183
0 commit comments