Readplace

(Medium) - Decouple Side-Effects

Gist 1 min read
View original
  • current

This article is too short to summarise.

This file contains hidden or 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();
});
};