Skip to content

Commit

Permalink
Use isReactComponent in invariant
Browse files Browse the repository at this point in the history
  • Loading branch information
janicduplessis committed Oct 12, 2017
1 parent e25b54d commit affbd87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Animated/src/createAnimatedComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const invariant = require('fbjs/lib/invariant');

function createAnimatedComponent(Component: any): any {
invariant(
Component.prototype.render,
Component.prototype && Component.prototype.isReactComponent,
'`createAnimatedComponent` does not support stateless functional components, ' +
'use a class component instead.',
);
Expand Down

0 comments on commit affbd87

Please sign in to comment.