1
User
Recs.
Recs.
11
Updates
Last
Updated
Updated
Activity
23 Options
Specs
Specs are quantitative aspects of the option such as the price
Pros
Pro Custom tags
Custom tags provide a simple mechanism for embedding more complex components into a template by extending the HTML grammar with support for new tags. For example:
<div>
<say-hello name="World"/>
</div>
Custom tags are easy to create since they just map to a JavaScript "renderer" function as shown below:
module.exports = function sayHelloRenderer(input, out) {
out.write('Hello ' + input.name + '!');
}
Custom tags support nested content:
<fancy-overlay title="My Title">
This will be the body content of the overlay
</fancy-overlay>
Custom tags can also have parent/child relationships to support more complex use cases such a "tabs" component with nested "tab" components:
<fancy-tabs>
<fancy-tabs:tab label="Home">
Content for Home
</fancy-tabs:tab>
<fancy-tabs:tab label="Profile">
Content for Profile
</fancy-tabs:tab>
<fancy-tabs:tab label="Messages">
Content for Messages
</fancy-tabs:tab>
</fancy-tabs>
Know any positive aspects of this option?
Cons
Know any negative aspects of this option?
Recommendations
Marko
Recommended 6 years ago
Pro
Extremely fastPro
Compiled templates are readable CommonJS modulesPro
Custom tagsPro
Server-side renderingPro
Asynchronous renderingPro
StreamingPro
Simple and readable syntaxPro
Short learning curvePro
Lightweight runtime (~4 KB gzip) Pro
Easy to integrate with express.js