Question - What is a render function?
Answer -
Render function is a normal function which receives a createElement method as it’s first argument used to create virtual nodes. Internally Vue.js' templates actually compile down to render functions at build time. Hence templates are just syntactic sugar of render functions.
Let's take an example of simple Div markup and corresponding render function. The HTML markup can be written in template tag as below,
Welcome to Vue render functions
and the compiled down or explicit render function would appear as below,
render: function (createElement) {
return createElement('div', {
'class': {
'is-rounded': this.isRounded
}
}, [
createElement('p', 'Welcome to Vue render functions')
]);
}