DEV Community

Discussion on: Exploration of Tagged template Literals

Collapse
 
evanplaice profile image
Evan Plaice

FYI, I wrote a library that can be used to create a tagged template literal from raw text. For example, you can fetch the literal from an external file and load it using the lib.

github.com/vanillaes/interpolate

Collapse
 
juliencavaleiro profile image
Julien Cavaleiro

Interesting! What is your use case for it? Non ES6 engine?

Collapse
 
evanplaice profile image
Evan Plaice

Why introduce a new template syntax when JS already has a template syntax built-in?

For example, here's a web component that can fetch both the template and context (ie data) without the need to write any JS.

github.com/vanillawc/wc-template