Skip to content

Instantly share code, notes, and snippets.

@monday8am
Last active July 29, 2018 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monday8am/52c76962e0281b25a60b081f5004aad5 to your computer and use it in GitHub Desktop.
Save monday8am/52c76962e0281b25a60b081f5004aad5 to your computer and use it in GitHub Desktop.
Async seudo code call
if state.needsAsyncData {
dispatch(LoadingAction)
asyncCall()
.whenOk { dispatch(OkAction(result) }
.whenError { dispatch(ErrorAction(error)) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment