File tree 2 files changed +8
-0
lines changed
packages/react-native-web/src/exports
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { bool } from 'prop-types';
14
14
import { Component } from 'react' ;
15
15
import createElement from '../createElement' ;
16
16
import css from '../StyleSheet/css' ;
17
+ import warning from 'fbjs/lib/warning' ;
17
18
import StyleSheet from '../StyleSheet' ;
18
19
import TextPropTypes from './TextPropTypes' ;
19
20
@@ -60,6 +61,10 @@ class Text extends Component<*> {
60
61
61
62
const { isInAParentText } = this . context ;
62
63
64
+ if ( process . env . NODE_ENV !== 'production' ) {
65
+ warning ( this . props . className == null , 'Using the "className" prop on <Text> is deprecated.' ) ;
66
+ }
67
+
63
68
if ( onPress ) {
64
69
otherProps . accessible = true ;
65
70
otherProps . onClick = this . _createPressHandler ( onPress ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import createElement from '../createElement';
13
13
import css from '../StyleSheet/css' ;
14
14
import filterSupportedProps from './filterSupportedProps' ;
15
15
import invariant from 'fbjs/lib/invariant' ;
16
+ import warning from 'fbjs/lib/warning' ;
16
17
import StyleSheet from '../StyleSheet' ;
17
18
import ViewPropTypes , { type ViewProps } from './ViewPropTypes' ;
18
19
import React , { Component } from 'react' ;
@@ -42,6 +43,8 @@ class View extends Component<ViewProps> {
42
43
const supportedProps = filterSupportedProps ( this . props ) ;
43
44
44
45
if ( process . env . NODE_ENV !== 'production' ) {
46
+ warning ( this . props . className == null , 'Using the "className" prop on <View> is deprecated.' ) ;
47
+
45
48
React . Children . toArray ( this . props . children ) . forEach ( item => {
46
49
invariant (
47
50
typeof item !== 'string' ,
You can’t perform that action at this time.
0 commit comments