diff --git a/react-native/react-native-tests.tsx b/react-native/react-native-tests.tsx index f2e4cc22f6..d4b89ab344 100644 --- a/react-native/react-native-tests.tsx +++ b/react-native/react-native-tests.tsx @@ -20,7 +20,7 @@ For a list of complete Typescript examples: check https://github.com/bgrieder/RN /// -import React from 'react-native' +import * as React from 'react-native' const { StyleSheet, Text, View } = React var styles = StyleSheet.create( diff --git a/react-native/react-native.d.ts b/react-native/react-native.d.ts index dc6cc5e3c5..1ffa1d5461 100644 --- a/react-native/react-native.d.ts +++ b/react-native/react-native.d.ts @@ -3459,7 +3459,7 @@ declare namespace __React { declare module "react-native" { import ReactNative = __React - export default ReactNative + export = ReactNative } declare var global: __React.GlobalStatic @@ -3469,7 +3469,7 @@ declare function require( name: string ): any //TODO: BGR: this is a left-over from the initial port. Not sure it makes any sense declare module "Dimensions" { - import React from 'react-native'; + import * as React from 'react-native'; interface Dimensions { get( what: string ): React.ScaledSize;