function deletePost(id, callback) {
  const request = axios.delete(`${ROOT_URL}/posts/${id}${API_KEY}`)
    .then(() => callback());

  return {
    type: DELETE_POST,
    payload: id
  }
}
/*
  deletePost(id, callback): make delete AJAX request to /posts/:id
  - return id of post being deleted to be passed to reducer to delete
    post from state
  - include callback for navigation after successful delete
*/
deletePost(id, callback): make delete AJAX request to /posts/:id
return id of post being deleted to be passed to reducer to delete
post from state
include callback for navigation after successful delete
deletePost ( id callback ) : make delete AJAX request to / posts / : id return id of post being deleted to be passed to reducer to delete post from state include callback for navigation after successful delete
function deletePost(id, callback) {
  const request = axios.delete(`${ROOT_URL}/posts/${id}${API_KEY}`)
    .then(() => callback());
  return {
    type: DELETE_POST,
    payload: id
  }
}
function deletePost ( id , callback ) { const request = axios . delete ( ` ${ ROOT_URL } ${ id } ${ API_KEY } ` ) . then ( ( ) => callback ( ) ) ; return { type : DELETE_POST , payload : id } }
deletePost(id, callback): make delete AJAX request to /posts/:id
 return id of post being deleted to be passed to reducer to delete
post from state
 include callback for navigation after successful delete
deletePost ( id callback ) : make delete AJAX request to / posts / : id return id of post being deleted to be passed to reducer to delete post from state include callback for navigation after successful delete