Comment Comment by pretzelhands <template> tags are so incredibly useful for keeping your JS clean when you're not able to have something more reactive around for some reason.I've recently used that on an interview project I did (https://github.com/pretzelhands/ubiquitous-sniffle) and it surprisingly takes you quite far with very little effort.The only major annoyance is really manually keeping track of the elements in the DOM and .innerText and .innerHTML-ing everything that needs a dynamic value. But it's manageable if you keep it confined. parent pretzelhands 4 years ago
I've recently used that on an interview project I did (https://github.com/pretzelhands/ubiquitous-sniffle) and it surprisingly takes you quite far with very little effort.
The only major annoyance is really manually keeping track of the elements in the DOM and .innerText and .innerHTML-ing everything that needs a dynamic value. But it's manageable if you keep it confined.