0Pricing
Vue Academy · Lesson

The h() Function Deep Dive

h(type, props, children) signature, VNode structure, rendering dynamic component types.

What is the h Function

The h function (short for hyperscript) creates virtual DOM nodes (VNodes) directly in JavaScript. It is the foundation that templates compile down to. A render function returns the result of calling h.

The Signature

h takes three arguments: h(type, props, children). The type can be a tag name string, a component object, or a functional component. props is an object of attributes, props, and events. children is text, an array of VNodes, or a slots object.

import { h } from "vue";

h(type, props, children);

All lessons in this course

  1. The h() Function Deep Dive
  2. JSX in Vue 3 with Vite
  3. Dynamic Components with render Functions
  4. Higher-Order Components (HOC) Pattern
← Back to Vue Academy