Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Axios.post(`https://.../createPost`, postData)
- .then((result) => {
- dispatch({
- type: CREATE_POST_SUCCESS,
- payload: result
- })
- }).catch((error) => {
- dispatch({
- type: CREATE_POST_ERROR,
- payload: error
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement