2

I'm looking for a small templating JS library to replace a variety of jQuery, underscore.js and explicit HTML construction. We frequently end up adding a large library to perform a couple of basic tasks. underscore.js is actually a pretty good fallback, but I thought there may be other options which do less.

  • Performance is not a great concern
  • Ideally handles entity encoding
  • Supports looping and nested objects
2
  • 1
    Could using Vanilla JS be used to choose just the options you need in the library per each project?
    – Tom
    Commented Oct 5, 2016 at 1:52
  • I like the way that it lets you choose what functionalty you will need, before downloading (+1).
    – Mawg
    Commented May 4, 2017 at 8:13

1 Answer 1

1

I've used with pleasure Ractivejs. To quote their website

About Ractive.js

Ractive was originally created at theguardian.com to produce news applications. A typical news app is heavily interactive, combines HTML and SVG, and is developed under extreme deadline pressure. It has to work reliably across browsers, and perform well even on mobile devices.

Many tools exist to help you build web apps, but very few deal with the fundamental problem: HTML, while excellent at describing static documents, wasn't designed for interactivity. Ractive changes that. It takes your Mustache templates and transforms them into a lightweight representation of the DOM – then when your data changes, it intelligently updates the real DOM.

The best way to understand how Ractive will make your life as a web developer easier is to see the examples, try the 60 second setup, and follow the interactive tutorials.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.