Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

213
Vistas
What's the difference between creating the Vue instance properties inside and outside the export default?

So in Vuejs, what is the difference between the two below?

  1. Is it more advisable to do the first one?
  2. Is it advisable to use the second one for other properties (methods, computed, watch, etc)?
  3. What are the effects of using the second one for creating the properties?

Thank you for any input!

<template>
</template>

<script>

export default {
    data() {
      return {
      .........
      }
    },

</script>

<script>

let data = {
    .....
}

export default {
  data() {
    return data
  },
      
 </script>

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda