Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/reduxjs/redux
/ fetchPostsIfNeeded
Function
fetchPostsIfNeeded
examples/async/src/actions/index.js:46–50 · examples/async/src/actions/index.js::fetchPostsIfNeeded
Source
from the content-addressed store, hash-verified
44
}
45
46
export
const
fetchPostsIfNeeded = subreddit => (dispatch, getState) => {
47
if
(shouldFetchPosts(getState(), subreddit)) {
48
return
dispatch(fetchPosts(subreddit))
49
}
50
}
Callers
3
componentDidMount
Function · 0.90
componentDidUpdate
Function · 0.90
App.js
File · 0.90
Calls
4
shouldFetchPosts
Function · 0.85
getState
Function · 0.85
fetchPosts
Function · 0.85
dispatch
Function · 0.50
Tested by
no test coverage detected