Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 0 additions & 80 deletions packages/react-native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import typeof * as ReactNativePublicAPI from './index.js.flow';

const warnOnce = require('./Libraries/Utilities/warnOnce').default;
const invariant = require('invariant');

module.exports = {
// #region Components
Expand Down Expand Up @@ -395,82 +394,3 @@ module.exports = {
},
// #endregion
} as ReactNativePublicAPI;

if (__DEV__) {
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access AsyncStorage. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access AsyncStorage. */
Object.defineProperty(module.exports, 'AsyncStorage', {
configurable: true,
get() {
invariant(
false,
'AsyncStorage has been removed from react-native core. ' +
"It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. " +
'See https://github.com/react-native-async-storage/async-storage',
);
},
});
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access ImagePickerIOS. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access ImagePickerIOS. */
Object.defineProperty(module.exports, 'ImagePickerIOS', {
configurable: true,
get() {
invariant(
false,
'ImagePickerIOS has been removed from React Native. ' +
"Please upgrade to use either 'react-native-image-picker' or 'expo-image-picker'. " +
"If you cannot upgrade to a different library, please install the deprecated '@react-native-community/image-picker-ios' package. " +
'See https://github.com/rnc-archive/react-native-image-picker-ios',
);
},
});
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access ProgressViewIOS. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access ProgressViewIOS. */
Object.defineProperty(module.exports, 'ProgressViewIOS', {
configurable: true,
get() {
invariant(
false,
'ProgressViewIOS has been removed from react-native core. ' +
"It can now be installed and imported from '@react-native-community/progress-view' instead of 'react-native'. " +
'See https://github.com/react-native-progress-view/progress-view',
);
},
});
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access DatePickerIOS. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access DatePickerIOS. */
Object.defineProperty(module.exports, 'DatePickerIOS', {
configurable: true,
get() {
invariant(
false,
'DatePickerIOS has been removed from react-native core. ' +
"It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " +
'See https://github.com/react-native-datetimepicker/datetimepicker',
);
},
});
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access Slider. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access Slider. */
Object.defineProperty(module.exports, 'Slider', {
configurable: true,
get() {
invariant(
false,
'Slider has been removed from react-native core. ' +
"It can now be installed and imported from '@react-native-community/slider' instead of 'react-native'. " +
'See https://github.com/callstack/react-native-slider',
);
},
});
}
Loading