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

169
Vistas
What's the advantage of using an anonymous function to import a Vue component compared to importing it before the export statement?

I'm going through a Vuetify theme to learn how to use it and came across a new syntax I've never seen before for importing one Vue component into another.

I searched on Google, but can't find any reference to this method.

Instead of importing a component before the export, the component is imported as the return value from an arrow function. I know that it works because the site is working, I'm just trying to understand what is happening compared to the normal style of importing and what benefits this offers. Any insight is appreciated!

Typical Syntax:

<script>
import CoreAppBar from "@/components/CoreAppBar.vue";
import CoreFooter from "@/components/CoreFooter.vue";

export default {
  components: {
    CoreAppBar,
    CoreFooter,
  },
};
</script>

Syntax I'd like to understand:

<script>
  export default {
    name: 'App',

    components: {
      CoreAppBar: () => import('@/components/core/AppBar'),
      CoreFooter: () => import('@/components/core/Footer'),
    },
  }
</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