add checkbox-moved warning (#24098)

Summary:
checkbox has been moved to react-native-community in this PR:
https://github.com/react-native-community/react-native-checkbox/pull/1

[General] [Changed] - Add warning info about checkbox which is moved to react native community
Pull Request resolved: https://github.com/facebook/react-native/pull/24098

Differential Revision: D14585872

Pulled By: PeteTheHeat

fbshipit-source-id: 02d0167a3bf32ff8fac3880c1e7b7c04d8f37b48
This commit is contained in:
nicholaslee119
2019-03-22 15:55:59 -07:00
committed by Facebook Github Bot
parent 3711ea6937
commit 077c0f7094

View File

@@ -29,6 +29,12 @@ module.exports = {
return require('Button');
},
get CheckBox() {
warnOnce(
'checkBox-moved',
'CheckBox 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/checkbox' instead of 'react-native'. " +
'See https://github.com/react-native-community/react-native-checkbox',
);
return require('CheckBox');
},
get DatePickerIOS() {