File tree Expand file tree Collapse file tree 2 files changed +3
-26
lines changed
Expand file tree Collapse file tree 2 files changed +3
-26
lines changed Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments