MCPcopy
hub / github.com/Hashnode/mern-starter / fetchPosts

Function fetchPosts

client/modules/Post/PostActions.js:35–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33}
34
35export function fetchPosts() {
36 return (dispatch) => {
37 return callApi('posts').then(res => {
38 dispatch(addPosts(res.posts));
39 });
40 };
41}
42
43export function fetchPost(cuid) {
44 return (dispatch) => {

Callers 2

componentDidMountFunction · 0.90
PostListPage.jsFile · 0.90

Calls 2

callApiFunction · 0.85
addPostsFunction · 0.85

Tested by

no test coverage detected