mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove View.propTypes RN deprecation workaround (#10683)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user