We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ca6172 commit 704fbd5Copy full SHA for 704fbd5
Libraries/Animated/src/createAnimatedComponent.js
@@ -17,7 +17,15 @@ const AnimatedProps = require('./nodes/AnimatedProps');
17
const React = require('React');
18
const ViewStylePropTypes = require('ViewStylePropTypes');
19
20
+const invariant = require('fbjs/lib/invariant');
21
+
22
function createAnimatedComponent(Component: any): any {
23
+ invariant(
24
+ Component.prototype.render,
25
+ '`createAnimatedComponent` does not support stateless functional components, ' +
26
+ 'use a class component instead.',
27
+ );
28
29
class AnimatedComponent extends React.Component<Object> {
30
_component: any;
31
_prevComponent: any;
0 commit comments