Skip to content

Instantly share code, notes, and snippets.

@cursosdesarrolloweb
Last active October 3, 2020 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cursosdesarrolloweb/2252f326f477b31f9a32d529881b1a5d to your computer and use it in GitHub Desktop.
Save cursosdesarrolloweb/2252f326f477b31f9a32d529881b1a5d to your computer and use it in GitHub Desktop.
Vue.component('hola-mundo', {
data () {
return {
message: 'Hola Mundo'
}
},
template: `
<div>
<h2>Componente Hola Mundo en Vue 2</h2>
<p>{{ message }}</p>
</div>
`
});
app.component('hola-mundo', {
setup() {
const message = ref("Hola Mundo")
return { message }
},
template: `
<h2>Componente Hola Mundo en Vue 3</h2>
<p>{{ message }}</p>
`
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment