Last active
July 15, 2018 00:00
-
-
Save FagnerMartinsBrack/9ab6afe3de083648a1b7e8bfa301721c to your computer and use it in GitHub Desktop.
(Medium) - Decouple Side-Effects
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
const createListOfPosts_ = () => { | |
const PostsResponse = /* import */ PostsResponse_; | |
return fetch( | |
+ '/blog/articles' | |
- '/blog/posts' | |
).then((response) => { | |
return response.text(); | |
}).then((htmlResponse) => { | |
return PostsResponse(htmlResponse).toHtmlList(); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment