Add Deprecation Warning to ListView
Summary: This component has long been deprecated in the docs. Adding a warning to the code. Reviewed By: sahrens Differential Revision: D10261155 fbshipit-source-id: 462ce30a97f35e52477cfc135fb50c976b56e9cb
This commit is contained in:
parent
5512c47429
commit
e90f5fa263
|
@ -12,6 +12,8 @@
|
||||||
|
|
||||||
const invariant = require('fbjs/lib/invariant');
|
const invariant = require('fbjs/lib/invariant');
|
||||||
|
|
||||||
|
let showedListViewDeprecation = false;
|
||||||
|
|
||||||
// Export React, plus some native additions.
|
// Export React, plus some native additions.
|
||||||
const ReactNative = {
|
const ReactNative = {
|
||||||
// Components
|
// Components
|
||||||
|
@ -58,6 +60,14 @@ const ReactNative = {
|
||||||
return require('KeyboardAvoidingView');
|
return require('KeyboardAvoidingView');
|
||||||
},
|
},
|
||||||
get ListView() {
|
get ListView() {
|
||||||
|
if (!showedListViewDeprecation) {
|
||||||
|
console.warn(
|
||||||
|
'ListView is deprecated and will be removed in a future release. ' +
|
||||||
|
'See https://fb.me/nolistview for more information',
|
||||||
|
);
|
||||||
|
|
||||||
|
showedListViewDeprecation = true;
|
||||||
|
}
|
||||||
return require('ListView');
|
return require('ListView');
|
||||||
},
|
},
|
||||||
get MaskedViewIOS() {
|
get MaskedViewIOS() {
|
||||||
|
|
Loading…
Reference in New Issue