The render function now receives the component instance's $createElement method as its only argument. This avoids having to aliasing this.$createElement to something less verbose:
Vue.extend({
render (h) {
return h('div', null, 'hello!')
}
})
Functional components:
A component can be defined as a stateless functional component with functional: true.
createElement: the parent component's $createElement method.
props: an object containing props
children: children inside the component's tag as vnodes
A functional component has no instance and is simply a function that receives props and children vnodes via arguments, and also return vnode(s).
Unlike stateful components, functional components are not restrictedby the "single root node" rule and can return an Array of multiple
vnodes.
A functional component's render function receives the following arguments: