JSFiddle - React, Tailwind, and code Playground
by imall
HTML
<script src="https://unpkg.com/[email protected]/dist/vue.global.js"></script>
<div id="app">
<my-component v-bind="msg"></my-component>
</div>
JavaScript
const app = Vue.createApp({
setup() {
const msg = {
name: 'imall',
age: 24,
};
return {
msg,
};
},
});
app.component("my-component", {
template: `
<div>
<h1> {{ name }} </h1>
<p> {{ age }} </p>
</div>`,
props: {
name: String,
age: Number,
},
});
app.mount('#app');