From 69bd0f631dc0a1640e1f4449611e03d0339e8e81 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Fri, 8 Mar 2019 13:23:53 -0800 Subject: [PATCH] [change] Remove default ES Module export Remove the default export that was provided for compatibility with legacy imports of React Native CommonJS modules. These patterns are no longer supported: ``` import ReactNative from 'react-native'; const ReactNative = require('react-native'); ``` Fix #1258 Close #1277 --- packages/react-native-web/src/index.js | 109 ------------------------- 1 file changed, 109 deletions(-) diff --git a/packages/react-native-web/src/index.js b/packages/react-native-web/src/index.js index 3638d2f47..0cdbe9d38 100644 --- a/packages/react-native-web/src/index.js +++ b/packages/react-native-web/src/index.js @@ -214,112 +214,3 @@ export { TVEventHandler, VibrationIOS }; - -const ReactNative = { - // top-level API - createElement, - findNodeHandle, - render, - unmountComponentAtNode, - // modules - processColor, - NativeModules, - TextPropTypes, - ViewPropTypes, - // APIs - AccessibilityInfo, - Alert, - Animated, - AppRegistry, - AppState, - AsyncStorage, - BackHandler, - Clipboard, - DeviceInfo, - Dimensions, - Easing, - I18nManager, - InteractionManager, - Keyboard, - LayoutAnimation, - Linking, - NativeEventEmitter, - NetInfo, - PanResponder, - PixelRatio, - Platform, - Share, - StyleSheet, - UIManager, - Vibration, - // components - ActivityIndicator, - ART, - Button, - CheckBox, - FlatList, - Image, - ImageBackground, - KeyboardAvoidingView, - ListView, - Modal, - Picker, - ProgressBar, - RefreshControl, - SafeAreaView, - ScrollView, - SectionList, - Slider, - StatusBar, - SwipeableFlatList, - SwipeableListView, - Switch, - Text, - TextInput, - Touchable, - TouchableHighlight, - TouchableNativeFeedback, - TouchableOpacity, - TouchableWithoutFeedback, - View, - VirtualizedList, - YellowBox, - // propTypes - ColorPropType, - EdgeInsetsPropType, - PointPropType, - // compat (components) - DatePickerIOS, - DrawerLayoutAndroid, - ImageEditor, - ImageStore, - InputAccessoryView, - MaskedViewIOS, - NavigatorIOS, - PickerIOS, - ProgressBarAndroid, - ProgressViewIOS, - SegmentedControlIOS, - SnapshotViewIOS, - TabBarIOS, - ToastAndroid, - ToolbarAndroid, - ViewPagerAndroid, - WebView, - // compat (apis) - ActionSheetIOS, - AlertIOS, - CameraRoll, - DatePickerAndroid, - ImagePickerIOS, - PermissionsAndroid, - PushNotificationIOS, - Settings, - StatusBarIOS, - Systrace, - TimePickerAndroid, - TVEventHandler, - VibrationIOS -}; - -export default ReactNative;