Closed
Description
What problem does this feature solve?
In the Vue Component's render()
function, there is no normal way to create a VNode which represents naked text, same as what createTextVNode()
would create.
This is needed when we want to generate things like:
<div>
Hello <strong>Vue</strong>'s world.
</div>
What does the proposed API look like?
I propose to change the API in one of those 2 ways:
-
Add a behavior to the
h
function which is given to the user in therender()
function so that it can be used for creating a 'text VNode', and document it. I propose to use the null or undefined on the first parameter. -
Expose the
createTextVNode()
function (and why not alsoVNode()
) somewhere inside Vue.
Metadata
Metadata
Assignees
Labels
No labels