File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/react-native-renderer/src Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,9 @@ if (__DEV__) {
187187 const NativeMethodsMixin_DEV = ( NativeMethodsMixin : any ) ;
188188 invariant (
189189 ! NativeMethodsMixin_DEV . componentWillMount &&
190- ! NativeMethodsMixin_DEV . componentWillReceiveProps ,
190+ ! NativeMethodsMixin_DEV . componentWillReceiveProps &&
191+ ! NativeMethodsMixin_DEV . unsafe_componentWillMount &&
192+ ! NativeMethodsMixin_DEV . unsafe_componentWillReceiveProps ,
191193 'Do not override existing functions.' ,
192194 ) ;
193195 NativeMethodsMixin_DEV . componentWillMount = function ( ) {
@@ -196,6 +198,12 @@ if (__DEV__) {
196198 NativeMethodsMixin_DEV . componentWillReceiveProps = function ( newProps ) {
197199 throwOnStylesProp ( this , newProps ) ;
198200 } ;
201+ NativeMethodsMixin_DEV . unsafe_componentWillMount = function ( ) {
202+ throwOnStylesProp ( this , this . props ) ;
203+ } ;
204+ NativeMethodsMixin_DEV . unsafe_componentWillReceiveProps = function ( newProps ) {
205+ throwOnStylesProp ( this , newProps ) ;
206+ } ;
199207}
200208
201209export default NativeMethodsMixin;
You can’t perform that action at this time.
0 commit comments