JSFiddle - React, Tailwind, and code Playground
by kurotanshi
HTML
<script src="https://unpkg.com/vue@next"></script>
<div id="app"></div>
JavaScript
const { createApp, ref } = Vue;
const app = createApp({
template: `
<h1>{{ aaa }}</h1>
<input v-model="aaa">
<hr>
<test :aaa="aaa"></test>
`,
setup(){
const aaa = ref('Hello');
return {
aaa
};
}
});
app.component('test', {
props: ['aaa'],
template: `
<h2>{{ aaa }}</h2>
<input v-model="aaa">
<test2 :aaa="aaa"></test2>
`,
components: {
'test2': {
props: ['aaa'],
template: `
<h3>{{ aaa }}</h3>
<input v-model="aaa">
<test2 :aaa="aaa"></test2>
`,
}
}
});
app.mount('#app');