[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
This commit is contained in:
Nicolas Gallagher
2019-03-08 13:23:53 -08:00
parent 9ce2b5bf0c
commit 69bd0f631d
-109
View File
@@ -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;