vue render function slot
Introduction to Render Functions
What is a render function? Let's see a simple example and the comparison with Vue compiled code and its counterpart template compiled code.
VUEJS - Các hàm render & JSX - Hiệp sĩ IT
Vue.component('anchored-heading', { render: function (createElement) { return createElement( 'h' + this.level, // tên thẻ this.$slots.default // mảng các phần tử con ) }, props: { level: { type: Number, required: true } } }).
Vue Render Functions: What (and How) to Use Them
Vue, at build time, takes the templates we create for our components and compiles them to render functions. It’s at these compiled render functions, where Vue builds a virtual representation of nodes that make up the virtual DOM.