When comparing Yesod vs Koa, the Slant community recommends Yesod for most people. In the question“What are the best backend web frameworks?” Yesod is ranked 12th while Koa is ranked 33rd. The most important reason people chose Yesod is:
While not required, Yesod offers templating through a Shakespearean family of languages to produce page code.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Offers templating for type-safe, well-formed content
While not required, Yesod offers templating through a Shakespearean family of languages to produce page code.
Pro Uses type-safe URLs
Ensures that data provided by the URL is type-safe. This means that data in the URL has a definitive type.
Pro Can be used without knowing much Haskell
While Yesod is written in Haskell, developers can achieve basic functionality without much investment in the language.
Pro Generator support from ground up
Using generators (a bleeding edge feature, even for Node.js) would clean up your code from the mess caused by all those callbacks; making your code more manageable.
Pro Extremely lightweight
Koa is very lightweight with just 550 lines of code.
Pro async/await keywords are supported and has transcended beyond generator functions
Generators functions are of course a huge plus, but at the time Koa team has transcended generations functions and shifted towards async/await style programming. It has made the Koa best framework available in the market.
Pro Development team has a proven track record
Koa is developed by the team behind a widely used node.js framework (express.js).
Pro Built for ES6
Cons
Con Is hard to customize
Learning how Yesod works internally is hard. It is a large framework with complicated components. Finding the appropriate code and understanding how it contributes to the framework is difficult, meaning developers will struggle.
Con Too much template haskell
You actually want to code in haskell and not some DSL with "magic" hidden under the bonnet.
Con Community is relatively small
Con Not compatible with express style middleware
Koa uses generators which are not compatible with any other type of Node.js framework middleware.