We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86b9d8b commit 83dd956Copy full SHA for 83dd956
lib/react.js
@@ -44,8 +44,8 @@ declare class React$Component<Props, State = void> {
44
45
constructor(props?: Props, context?: any): void;
46
render(): React$Node;
47
- componentWillMount(): void;
48
- componentDidMount(): void;
+ componentWillMount(): void | Promise<void>;
+ componentDidMount(): void | Promise<void>;
49
componentWillReceiveProps(
50
nextProps: Props,
51
nextContext: any,
@@ -65,7 +65,7 @@ declare class React$Component<Props, State = void> {
65
prevState: State,
66
prevContext: any,
67
): void;
68
- componentWillUnmount(): void;
+ componentWillUnmount(): void | Promise<void>;
69
70
// long tail of other stuff not modeled very well
71
0 commit comments