MCPcopy Create free account
hub / github.com/gaearon/react-hot-loader / componentDidMount

Method componentDidMount

examples/webpack/src/Counter.js:6–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4 state = { count: 0 };
5
6 componentDidMount() {
7 this.interval = setInterval(() => this.setState(prevState => ({ count: prevState.count + 1 })), 200);
8 }
9
10 componentWillUnmount() {
11 clearInterval(this.interval);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected