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

Method shouldComponentUpdate

src/AppContainer.dev.js:39–48  ·  view source on GitHub ↗
(prevProps, prevState)

Source from the content-addressed store, hash-verified

37 }
38
39 shouldComponentUpdate(prevProps, prevState) {
40 // Don't update the component if the state had an error and still has one.
41 // This allows to break an infinite loop of error -> render -> error -> render
42 // https://github.com/gaearon/react-hot-loader/issues/696
43 if (prevState.error && this.state.error) {
44 return false;
45 }
46
47 return true;
48 }
49
50 componentDidCatch(error, errorInfo) {
51 logger.error(error);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected