Skip to content

Commit

Permalink
Remove View.propTypes RN deprecation workaround (#10683)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Sep 14, 2017
1 parent 03443a2 commit c043c1e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/isomorphic/classic/element/ReactElementValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c043c1e

Please sign in to comment.