Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Axios.post(`https://.../createPost`, postData)
  2.   .then((result) => {
  3.       dispatch({
  4.         type: CREATE_POST_SUCCESS,
  5.         payload: result
  6.       })
  7.    }).catch((error) => {
  8.       dispatch({
  9.         type: CREATE_POST_ERROR,
  10.         payload: error
  11.       })
  12.   });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement