Closed Punk-UnDeaD closed 5 years ago
using templates as string literals trash bins is not really in the spirit of this library + your solution is both slow, not efficient (lighterhtml parses template literals once, not per each usage, thanks to the template literal uniqueness per scope), and easily error prone when string contains ${
or other chars.
accordingly, I don't think this library will ever have anything like that, but feel free to find your own solution to this.
P.S. your code is also unreadable compared to natural lighterhtml usage, and I honestly believe if you need to avoid template literals you are better off with any other library, not this one.
What about simple string interpolation?
I want something like this. So my template in string, not in js.
Look my solution for this