Learn JS Templates

A JavaScript template is typically used, but not always with a MV* solution to separate parts of the view (i.e., the UI) from the logic and model (i.e., the data or JSON).


NOTES:

Note that JavaScript 2015 (aka ES6) has a native templating mechanism called "Templates strings". Additionally, templating as of late has been replaced by things like JSX, a template element, or HTML strings.


ADVICE:

If I was not using React & JSX I'd first reach for JavaScript "Templates strings" and when that was lacking move to nunjucks.

results matching ""

    No results matching ""