render
function should return value JS-0622It is required to have a return value for every render
method.
A render function returns a virtual DOM node, commonly named VNode
in the Vue ecosystem, which is an interface that allows Vue to write these objects in your browser DOM.
They contain all the information necessary to work with Vue.
<script>
export default {
render (h) {
if (condition) {
return h('div', 'hello')
}
}
}
</script>
<script>
export default {
render (h) {
return h('div', 'hello')
}
}
</script>