diff --git a/src/createAnimatedComponent.js b/src/createAnimatedComponent.js index c5e0c518379..909ce7fb93c 100644 --- a/src/createAnimatedComponent.js +++ b/src/createAnimatedComponent.js @@ -17,7 +17,7 @@ function listener(data) { export default function createAnimatedComponent(Component) { invariant( - typeof Component === 'string' || + typeof Component !== 'function' || (Component.prototype && Component.prototype.isReactComponent), '`createAnimatedComponent` does not support stateless functional components; ' + 'use a class component instead.'