Add warning that CameraRoll has been moved to RNC (#23733)

Summary:
Adds a moved warning to the CameraRoll import directing people to the react-native-community/cameraroll package.

[Lean Core] [Warning] add warning that CameraRoll has been moved to RNC
Pull Request resolved: https://github.com/facebook/react-native/pull/23733

Differential Revision: D14298485

Pulled By: cpojer

fbshipit-source-id: cf03660c604a7337f234da107d7069c0ccf99f36
This commit is contained in:
Bartol Karuza 2019-03-03 21:04:11 -08:00 коммит произвёл Facebook Github Bot
Родитель 17ae61e14c
Коммит a2f11cb01f
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -213,6 +213,12 @@ module.exports = {
return require('BackHandler'); return require('BackHandler');
}, },
get CameraRoll() { get CameraRoll() {
warnOnce(
'cameraroll-moved',
'CameraRoll has been extracted from react-native core and will be removed in a future release. ' +
"It can now be installed and imported from '@react-native-community/cameraroll' instead of 'react-native'. " +
'See https://github.com/react-native-community/react-native-cameraroll',
);
return require('CameraRoll'); return require('CameraRoll');
}, },
get Clipboard() { get Clipboard() {