Add PureComponent definition (React 15.3)

Observably, it's identical to a Component, just with a default invisible shouldComponentUpdate.
This commit is contained in:
Diogo Franco
2016-07-30 21:42:25 +09:00
committed by GitHub
parent 2a24bbb7ca
commit 1837f78bed
+2
View File
@@ -178,6 +178,8 @@ declare namespace __React {
[key: string]: ReactInstance
};
}
class PureComponent<P, S> extends Component<P, S> {}
interface ClassicComponent<P, S> extends Component<P, S> {
replaceState(nextState: S, callback?: () => any): void;