MCPcopy
hub / github.com/reduxjs/redux / componentDidUpdate

Function componentDidUpdate

examples/async/src/containers/App.js:22–27  ·  view source on GitHub ↗
(prevProps)

Source from the content-addressed store, hash-verified

20 }
21
22 componentDidUpdate(prevProps) {
23 if (prevProps.selectedSubreddit !== this.props.selectedSubreddit) {
24 const { dispatch, selectedSubreddit } = this.props
25 dispatch(fetchPostsIfNeeded(selectedSubreddit))
26 }
27 }
28
29 handleChange = nextSubreddit => {
30 this.props.dispatch(selectSubreddit(nextSubreddit))

Callers

nothing calls this directly

Calls 2

fetchPostsIfNeededFunction · 0.90
dispatchFunction · 0.50

Tested by

no test coverage detected