function fetchPosts() {
  const request = axios.get(`${ROOT_URL}/posts${API_KEY}`);

  return {
    type: FETCH_POSTS,
    payload: request
  };
}
/*
  fetchPosts() gets the list of all post objects
  - redux promise middleware will resolve request into payload when
    action is called
  - payload returns all post objects as id:post name-value pairs
*/
fetchPosts() gets the list of all post objects
redux promise middleware will resolve request into payload when
action is called
payload returns all post objects as id:post name-value pairs
fetchPosts () gets the list of all post objects redux promise middleware will resolve request into payload when action is called payload returns all post objects as id : post name - value pairs
function fetchPosts() {
  const request = axios.get(`${ROOT_URL}/posts${API_KEY}`);
  return {
    type: FETCH_POSTS,
    payload: request
  };
}
function fetchPosts ( ) { const request = axios . get ( ` ${ ROOT_URL } ${ API_KEY } ` ) ; return { type : FETCH_POSTS , payload : request } ; }
fetchPosts() gets the list of all post objects
 redux promise middleware will resolve request into payload when
action is called
 payload returns all post objects as id:post name-value pairs
fetchPosts () gets the list of all post objects redux promise middleware will resolve request into payload when action is called payload returns all post objects as id : post name - value pairs