Get rid of redundant <template> tag when define a component
What problem does this feature solve?
As an improvement, make <template>
tag optional or remove it completely when defining html template for a component.
Current way to define a HelloWorld.vue
:
<template>
<h1>Hello World!</h1>
</template>
What does the proposed API look like?
I suggest to improve it to:
<h1>Hello World!</h1>
Much more concise, just one-liner instead of having 2 more lines and better readability overall.
Another thing is, maybe bringing back the native behavior of <template>
HTML element which gives flexibility when to render certain things.
Let's track this feature request in the RFC discussion instead https://github.com/vuejs/rfcs/discussions/525