Skip to content

Commit 1ab7d49

Browse files
yungstersfacebook-github-bot
authored andcommitted
RN: Cleanup __propTypesSecretDontUseThesePlease
Reviewed By: bvaughn Differential Revision: D7892903 fbshipit-source-id: aab0537fe508ac740d0a2798a04f54411c8c038d
1 parent 23f8f7a commit 1ab7d49

File tree

2 files changed

+3
-26
lines changed

2 files changed

+3
-26
lines changed

Libraries/ReactNative/requireNativeComponent.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -108,24 +108,8 @@ function requireNativeComponent(
108108

109109
viewConfig.uiViewClassName = viewName;
110110
viewConfig.validAttributes = {};
111-
112-
// ReactNative `View.propTypes` have been deprecated in favor of
113-
// `ViewPropTypes`. In their place a temporary getter has been added with a
114-
// deprecated warning message. Avoid triggering that warning here by using
115-
// temporary workaround, __propTypesSecretDontUseThesePlease.
116-
// TODO (bvaughn) Revert this particular change any time after April 1
117-
if (componentInterface) {
118-
viewConfig.propTypes =
119-
/* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
120-
* error found when Flow v0.68 was deployed. To see the error delete
121-
* this comment and run Flow. */
122-
typeof componentInterface.__propTypesSecretDontUseThesePlease ===
123-
'object'
124-
? componentInterface.__propTypesSecretDontUseThesePlease
125-
: componentInterface.propTypes;
126-
} else {
127-
viewConfig.propTypes = null;
128-
}
111+
viewConfig.propTypes =
112+
componentInterface == null ? null : componentInterface.propTypes;
129113

130114
let baseModuleName = viewConfig.baseModuleName;
131115
let bubblingEventTypes = viewConfig.bubblingEventTypes;

Libraries/ReactNative/verifyPropTypes.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,7 @@ function verifyPropTypes(
3030
var componentName =
3131
componentInterface.displayName || componentInterface.name || 'unknown';
3232

33-
// ReactNative `View.propTypes` have been deprecated in favor of
34-
// `ViewPropTypes`. In their place a temporary getter has been added with a
35-
// deprecated warning message. Avoid triggering that warning here by using
36-
// temporary workaround, __propTypesSecretDontUseThesePlease.
37-
// TODO (bvaughn) Revert this particular change any time after April 1
38-
var propTypes =
39-
(componentInterface: any).__propTypesSecretDontUseThesePlease ||
40-
componentInterface.propTypes;
33+
var propTypes = componentInterface.propTypes;
4134

4235
if (!propTypes) {
4336
return;

0 commit comments

Comments
 (0)