@samitouri / QOS-React / commits / fcc4f52cdd

Remove DefaultProps type parameter from ReactNativeComponent (#12332)

Timothy Yung committed Mar 6, 2018 at 17:45 UTC fcc4f52cdded62e3b8e95d18e3e6adf17b981eed
1 file changed +5 -2
packages/react-native-renderer/src/ReactNativeComponent.js
+5 -2
@@ -37,11 +37,14 @@ import findNumericNodeHandle from './findNumericNodeHandle';
37 *
38 * @abstract
39 */
40 -class ReactNativeComponent<DefaultProps, Props, State> extends React.Component<
40 +class ReactNativeComponent<Props, State = void> extends React.Component<
41 Props,
42 State,
43 > {
44 - static defaultProps: DefaultProps;
44 + /**
45 + * Due to bugs in Flow's handling of React.createClass, some fields already
46 + * declared in the base class need to be redeclared below.
47 + */
48 props: Props;
49 state: State;
50