4 ms·
Why are HTML templates a good thing? It's hands down my least favorite part of Vue.
by ng12 10y ago
Why are HTML templates a good thing? It's hands down my least favorite part of Vue.
- catenthusiast 10y agoYou don't even have to know use them. You can use render functions or JSX like React.
- VertigoJenny 10y agoIt makes integration with existing code trivial. Vue's HTML templates can be neatly integrated into pretty much anything without a struggle compared to tools that make assumptions about your build chain and what you are working with. To use Vue, you could include it with a <script> tag and suddenly your existing HTML can be rapidly extended. Or you could get way more involved and use webpack, JSX and such if you wanted to. To not have HTML templates means you need to do something more invasive to retrofit client-side templating into place. It's personally why I don't bother with libraries that don't offer similar, because I don't always have total control over what I am working on and I still need to get work done.
- azurelogic 10y agoI find them to be helpful in being able to see the markup as a complete chunk, without code getting in the way. In teams with "coders" and "designers", this also makes it easier for the designers to understand the components and do their work.