Files
DefinitelyTyped/types/react-native
James Ide 797f19a5eb [react-native] Update type definition for requireNativeComponent for 0.57.x
requireNativeComponent now only takes a string and returns a string. See the definition here: https://github.com/facebook/react-native/blob/1151c096dab17e5d9a6ac05b61aacecd4305f3db/Libraries/ReactNative/requireNativeComponent.js#L24-L27.

The return type here is specified as `React.ReactType`, which is a union type that includes strings. We can't use `string` because TypeScript treats it as an intrinsic element like `div` and thinks it has no props.

Updated the corresponding test code too.
2018-11-27 16:14:26 -08:00
..