Skip to content

Commit

Permalink
[change] Remove default ES Module export
Browse files Browse the repository at this point in the history
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
  • Loading branch information
necolas committed Mar 11, 2019
1 parent 9ce2b5b commit 69bd0f6
Showing 1 changed file with 0 additions and 109 deletions.
109 changes: 0 additions & 109 deletions packages/react-native-web/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 69bd0f6

Please sign in to comment.