A framework for building native applications using React
Remove __DEV__ stubs for previously-removed legacy modules (#57025)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/57025
The following modules were removed from `react-native` core years ago: `AsyncStorage`, `ImagePickerIOS`, `ProgressViewIOS`, `DatePickerIOS`, and `Slider`. Until now, accessing them from `react-native` triggered a `__DEV__`-only invariant that threw a helpful error directing users to the community package replacement.
Enough release cycles have passed that the friendly invariant is no longer needed. This commit removes the five `Object.defineProperty(module.exports, …)` blocks from `index.js`, along with the wrapping `if (__DEV__) { … }` shell and the now-unused `invariant` import.
After this change, accessing one of these names from `react-native` returns `undefined` (matching the behavior of any other non-exported name).
Replacement packages, for reference:
- `AsyncStorage` → `react-native-async-storage/async-storage`
- `ImagePickerIOS` → `react-native-image-picker` or `expo-image-picker`
- `ProgressViewIOS` → `react-native-community/progress-view`
- `DatePickerIOS` → `react-native-community/datetimepicker`
- `Slider` → `react-native-community/slider`
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D106640956
fbshipit-source-id: 682be5529312362142f4b8d96dde9c93b307bdc7 R
Rubén Norte committed
a18f53daef372fe55271c35eb2b2065f0f78b6b0
Parent: 7cc8c76
Committed by meta-codesync[bot] <215208954+meta-codesync[bot]@users.noreply.github.com>
on 6/1/2026, 1:44:30 PM