DEV Community

Madza
Madza

Posted on

What's your favorite templating engine?

There are a lot of options to choose from when it comes to templating engines. Same of the most popular ones include Pug(Jade), Handlebars, Mustache, Nunjucks, EJS, Dust, etc..

So far I've tried just Pug and EJS and I must say I prefer EJS without a doubt. Each one is not that hard to learn, so it's worth investigating each one.

Which ones have you tried and which one did you settle on?

Top comments (7)

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

JSX is actually the best, when it also works well with IDEs and TypeScript. It also avoid learning new languages in the category called Templating Engines.

Template string literals. Even though it is technically a function, I never really need to write the function directly. Generally very intuitive.

Actually, truthfully, I am currently using EJS, and retiring Pug.

Collapse
 
itsjzt profile image
Saurabh Sharma

I have mostly used pug, but I like ejs too

Collapse
 
ehsan profile image
Ehsan Azizi

I like Nunjucks, it's great, has more features and easier to write/read compared to EJS

Collapse
 
ben profile image
Ben Halpern

Just to throw a specialized one in there... I really love the role liquid plays.

We use it sparingly, but it’s a delightful approach IMO.

Collapse
 
shadowtime2000 profile image
shadowtime2000

I just like using Handlebars.

Collapse
 
annietaylorchen profile image
Annie Taylor Chen

EJS and Handlebars... but I would really love to work with React or Svelte these days.

Collapse
 
belenot profile image
belenot

If I say Thymeleaf,how long it take for JS devs to recognise that there are other platforms for web-development? :)