diff --git a/lib/react.js b/lib/react.js index ea51d989066..bd4bd8b616d 100644 --- a/lib/react.js +++ b/lib/react.js @@ -44,8 +44,8 @@ declare class React$Component { constructor(props?: Props, context?: any): void; render(): React$Node; - componentWillMount(): void; - componentDidMount(): void; + componentWillMount(): void | Promise; + componentDidMount(): void | Promise; componentWillReceiveProps( nextProps: Props, nextContext: any, @@ -65,7 +65,7 @@ declare class React$Component { prevState: State, prevContext: any, ): void; - componentWillUnmount(): void; + componentWillUnmount(): void | Promise; // long tail of other stuff not modeled very well