Fix docs generation

Summary: Docs generator can't handle arrow functions as class members, resort to old-style function & bind in constructor.

Reviewed By: bestander

Differential Revision: D3703698

fbshipit-source-id: 894e2ba3686cbda437d186c913979b2f1170fe34
This commit is contained in:
Felix Oghina 2016-08-11 12:10:22 -07:00 committed by Facebook Github Bot 1
parent 031fe4d797
commit 9965642ebc
1 changed files with 7 additions and 1 deletions

View File

@ -1502,6 +1502,12 @@ function createAnimatedComponent(Component: any): any {
class AnimatedComponent extends React.Component {
_component: any;
_propsAnimated: AnimatedProps;
_setComponentRef: Function;
constructor(props: Object) {
super(props);
this._setComponentRef = this._setComponentRef.bind(this);
}
componentWillUnmount() {
this._propsAnimated && this._propsAnimated.__detach();
@ -1578,7 +1584,7 @@ function createAnimatedComponent(Component: any): any {
);
}
_setComponentRef = c => {
_setComponentRef(c) {
this._component = c;
}
}