From cc4ab7fbe704d219a01db00dd440c5600caf70b9 Mon Sep 17 00:00:00 2001 From: Krzysztof Magiera Date: Tue, 10 Jul 2018 11:14:01 +0200 Subject: [PATCH] Update createAnimatedComponent to be compatible with react 16.4 changes --- src/createAnimatedComponent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.'