The children may be string literals, other virtual nodes, null, or
an array of those things. Strings are converted into text nodes, and
arrays are inlined as if the array contents were given as positional
arguments. This makes it simple to build up an array of children by
any desired means. null child values are simply ignored.
A bound function for each HTML tag name is available as a static
function attached to the h() function. E.g. h('div', ...) is
equivalent to h.div(...).
Create a new virtual element node.
Returns
A new virtual element node for the given parameters.
Notes
The children may be string literals, other virtual nodes,
null, or an array of those things. Strings are converted into text nodes, and arrays are inlined as if the array contents were given as positional arguments. This makes it simple to build up an array of children by any desired means.nullchild values are simply ignored.A bound function for each HTML tag name is available as a static function attached to the
h()function. E.g.h('div', ...)is equivalent toh.div(...).