From c043c1e7d9ee4aa224454530d91152cbb9764125 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 14 Sep 2017 19:46:24 +0100 Subject: [PATCH] Remove View.propTypes RN deprecation workaround (#10683) --- .../classic/element/ReactElementValidator.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/isomorphic/classic/element/ReactElementValidator.js b/src/isomorphic/classic/element/ReactElementValidator.js index 8d2f6e55395d9..4490a829d6b13 100644 --- a/src/isomorphic/classic/element/ReactElementValidator.js +++ b/src/isomorphic/classic/element/ReactElementValidator.js @@ -213,16 +213,7 @@ function validatePropTypes(element) { return; } var name = componentClass.displayName || componentClass.name; - - // ReactNative `View.propTypes` have been deprecated in favor of `ViewPropTypes`. - // In their place a temporary getter has been added with a deprecated warning message. - // Avoid triggering that warning during validation using the temporary workaround, - // __propTypesSecretDontUseThesePlease. - // TODO (bvaughn) Revert this particular change any time after April 1 ReactNative tag. - var propTypes = typeof componentClass.__propTypesSecretDontUseThesePlease === - 'object' - ? componentClass.__propTypesSecretDontUseThesePlease - : componentClass.propTypes; + var propTypes = componentClass.propTypes; if (propTypes) { currentlyValidatingElement = element;