Introduction

submited by
Style Pass
2024-12-02 21:00:03

Edge is a simple, Modern, and batteries included template engine for Node.js. Edge is similar to writing JavaScript. If you know JavaScript, you know Edge.

Many will not ask this question because all the popular template engines in the Node.js ecosystem are on life support or have barely innovated in the past few years.

On the other hand, we have evolved and used Edge inside AdonisJS for almost seven years. Following are some of the hand-picked features of Edge.

While JSX is excellent, it is technically not a template engine. JSX is a JavaScript syntax extension for XML, commonly used in frameworks like React, which many web developers employ to generate HTML.

On the other hand, Edge is a template engine that you can embed inside any markup language. Be it Markdown, JSON, YAML, and, of course, HTML.

I like JSX for many reasons, including type safety (when used with TypeScript). However, JSX can get verbose and is slightly low-level to cater to everyone's taste. On the other hand, Edge can be an excellent fit for individuals who enjoy the template engine's terse syntax and expressive nature.

Leave a Comment