Skip to content

Instantly share code, notes, and snippets.

@mheiber
Forked from anonymous/Architecture 1.js
Created January 13, 2018 03:38
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 mheiber/0b2448220427f5dd78fd3a41d619c510 to your computer and use it in GitHub Desktop.
Save mheiber/0b2448220427f5dd78fd3a41d619c510 to your computer and use it in GitHub Desktop.
Architecture 1.js
// Architecture 1
function callApi(x, y, z) {
manipulate params
manipulate params some more ...
return fetch(...)
.then(result => {
if (result.status === ...) {
handle status stuff
}
manipulate result
manipulate result some more ...
return manipulatedResult
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment