Created
December 4, 2019 09:27
-
-
Save gskachkov/df5311be71e934948093ac6c26e5f924 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const updateObject = (id, caption) => ({ | |
type: 'UPDATE_OBJECT', | |
id, | |
caption | |
}) | |
export const thunkedUpdateObject = (id, caption) => dispatch => { | |
return axios | |
.post(...) | |
.then(_ => { | |
dispatch(updateObject(id, caption)) | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://zoom.us/j/93900031235