/dev
Software development and programming
submit
ad
Advertise in /dev
Reach our dev-focused community
/post#cm5jmql0
reply to post

Best js templating library?

I am a complete noob learning frontend work and handlebars keeps popping up in AI recommendations. Is this still the go-to? The docs are extremely annoying to navigate.

4d|
Anonymous
|reply||
10 comments
4d|
Anonymous
||
Avoid this if you’re handling unsafe user input and showing it to other users.
4d|
Anonymous
||
What are you using the templating system for?
4d|
Anonymous
||
Right now the usual toy practice projects like todolists, book trackers, etc. I'm trying to cut my teeth on using vanilla JS before stepping into more structured front end frameworks. I really like the ergonomics of react's component style, was wondering if there's a better stepping stone toward that
4d|
Anonymous
||
If your goal is to learn fundamentals rather than be productive (or worry about script injection attacks), you could just use a templating library like handlebars. Lately I’ve been using the templating library that comes with Radash.

You might also enjoy trying a more primitive framework from the old days like backbone JS.
3d|
Anonymous
||
just use react
3d|
Anonymous
||
for me, it's mustache(5)
3d|
Anonymous
||
React's JSX is imo the best solution to the problem if working on a non-trivial project
3d|
Anonymous
||
Not just for React. JSX is a useful general purpose templating tool with a number of possible uses. Especially with the lovely type checking of TSX. There are several options for JSX/TSX outside of React including non-virtual DOM ones.
2d|
Anonymous
||
the string concatenation operator is +
3d|
Anonymous
||
Add a comment
0/2000