Vue

by leopoldthecuber

HTML

<div id="app">
  <my-compo :render-item="renderItem"/>
</div>

Vue

new Vue({
  el: "#app",
  components: {
    'my-compo': {
      props: {
        renderItem: Function
      },
      render(h) {
        return h('ul', [1, 2, 3].map(item => h('li', [this.renderItem ? this.renderItem(h, item) : item])))
      }
    }
  },
  data() {
    return {
      renderItem(h, item) {
        return h('span', `0${item}`)
      }
    }
  }
})