GeezerVison is showing github.com — Fix Flow type for React Native (#17992) · react/react@3f814e7
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/react-native-renderer/src
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/ReactNativeComponent.js +1-5Lines changed: 1 addition & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -41,16 +41,12 @@ export default function( |
41 | 41 | * |
42 | 42 | * @abstract |
43 | 43 | */ |
44 | | - class ReactNativeComponent<Props, State = void> extends React.Component< |
45 | | - Props, |
46 | | - State, |
47 | | - > { |
| 44 | + class ReactNativeComponent<Props> extends React.Component<Props> { |
48 | 45 | /** |
49 | 46 | * Due to bugs in Flow's handling of React.createClass, some fields already |
50 | 47 | * declared in the base class need to be redeclared below. |
51 | 48 | */ |
52 | 49 | props: Props; |
53 | | - state: State; |
54 | 50 |
|
55 | 51 | /** |
56 | 52 | * Removes focus. This is the opposite of `focus()`. |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/ReactNativeTypes.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -137,7 +137,7 @@ type SecretInternalsFabricType = { |
137 | 137 | * Provide minimal Flow typing for the high-level RN API and call it a day. |
138 | 138 | */ |
139 | 139 | export type ReactNativeType = { |
140 | | - NativeComponent: _InternalReactNativeComponentClass<{...}>, |
| 140 | + NativeComponent: typeof ReactNativeComponent, |
141 | 141 | findHostInstance_DEPRECATED( |
142 | 142 | componentOrHandle: any, |
143 | 143 | ): ?ElementRef<HostComponent<mixed>>, |
@@ -157,7 +157,7 @@ export type ReactNativeType = { |
157 | 157 | }; |
158 | 158 |
|
159 | 159 | export type ReactFabricType = { |
160 | | - NativeComponent: _InternalReactNativeComponentClass<{...}>, |
| 160 | + NativeComponent: typeof ReactNativeComponent, |
161 | 161 | findHostInstance_DEPRECATED(componentOrHandle: any): ?HostComponent<mixed>, |
162 | 162 | findNodeHandle(componentOrHandle: any): ?number, |
163 | 163 | dispatchCommand(handle: any, command: string, args: Array<any>): void, |
|