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

Method componentDidMount

examples/hotCold/src/Counter.js:7–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected