DEV Community

Discussion on: Best way to partition repetitive static html?

Collapse
 
berslucas profile image
Lucas Bersier

React is a javascript framework, and you (might) have to convert your current code to JSX or an alternative. It tells the end-user what the DOM tree is supposed to look like and then the user parses it.

Pug is a template engine, so you would write your code on your machine and it would print out html files that you distribute.

You're right that this could be less popular in the future, but I would also argue that since it's a development tool that you would use and not something that is dependent on the client this is less of an issue.

Handlebars.js and Pug are both template engines and you should not require the user to compile or parse your templates, this will increase runtime. (handlebarsjs.com/precompilation.html)

In the end, these are all tools, and you could use either or use React, it's all about choice. You might start a simple little ToDo app or a codepen.io to test out these things before committing to one.