diff --git a/Libraries/Animated/src/AnimatedImplementation.js b/Libraries/Animated/src/AnimatedImplementation.js index 948967f72..b1f453fcb 100644 --- a/Libraries/Animated/src/AnimatedImplementation.js +++ b/Libraries/Animated/src/AnimatedImplementation.js @@ -1750,12 +1750,6 @@ function createAnimatedComponent(Component: any): any { var callback = () => { if (this._component.setNativeProps) { if (!this._propsAnimated.__isNative) { - if (this._component.viewConfig == null) { - var ctor = this._component.constructor; - var componentName = ctor.displayName || ctor.name || ''; - throw new Error(componentName + ' "viewConfig" is not defined.'); - } - this._component.setNativeProps( this._propsAnimated.__getAnimatedValue() ); diff --git a/Libraries/Renderer/src/renderers/native/NativeMethodsMixin.js b/Libraries/Renderer/src/renderers/native/NativeMethodsMixin.js index eb2818f70..c97aa2739 100644 --- a/Libraries/Renderer/src/renderers/native/NativeMethodsMixin.js +++ b/Libraries/Renderer/src/renderers/native/NativeMethodsMixin.js @@ -139,6 +139,12 @@ var NativeMethodsMixin = { * Manipulation](docs/direct-manipulation.html)). */ setNativeProps: function(nativeProps: Object) { + if (!this.viewConfig) { + var ctor = this.constructor; + var componentName = ctor.displayName || ctor.name || ''; + invariant(false, componentName + ' "viewConfig" is not defined.'); + } + if (__DEV__) { warnForStyleProps(nativeProps, this.viewConfig.validAttributes); }