JSFiddle - React, Tailwind, and code Playground

by skirtle

HTML

<script src="https://unpkg.com/[email protected]/dist/vue.global.js"></script>
<div id="app"></div>

JavaScript

Vue.createApp({
  template: `
    <div>
      <my-child><sub-child /></my-child>
    </div>
  `,
  
  components: {
    MyChild: {
      render () {
        const children = this.$slots.default()
        
        for (const child of children) {
          child.props = child.props || {}
          
          child.props.onVnodeMounted = function () {
            console.log('here')
          }
        }
        
        return Vue.h('span', children)
      }
    },
    
    SubChild: {
      template: `<span>Sub</span>`
    }
  }
}).mount('#app')