Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save takahirohonda/3104d04b91f8bf0a5166bf7fd9fc7574 to your computer and use it in GitHub Desktop.
Save takahirohonda/3104d04b91f8bf0a5166bf7fd9fc7574 to your computer and use it in GitHub Desktop.
calling-async-function-in-action-with-redux-thunk-2
function dispatch(action) {
if (!isPlainObject(action)) {
throw new Error(
'Actions must be plain objects. ' +
'Use custom middleware for async actions.'
)
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment