From a2f11cb01fc01031e48bc4d8a1ff29edf32cdd9f Mon Sep 17 00:00:00 2001 From: Bartol Karuza Date: Sun, 3 Mar 2019 21:04:11 -0800 Subject: [PATCH] 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 --- Libraries/react-native/react-native-implementation.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Libraries/react-native/react-native-implementation.js b/Libraries/react-native/react-native-implementation.js index 5900c79af48..adf7b4d488a 100644 --- a/Libraries/react-native/react-native-implementation.js +++ b/Libraries/react-native/react-native-implementation.js @@ -213,6 +213,12 @@ module.exports = { return require('BackHandler'); }, 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'); }, get Clipboard() {