Vue.js Import A Component

Raja Tamil
1 min readSep 20, 2021

When an app gets bigger, we’ll need to split the code into child components for reusability purposes.

Let’s see how to import a Child Component to a Parent Component with 3 simple steps.

Let’s say you have a folder structure like this:

/pages (parent)
/components (child)

STEP 01: First, Import the Child Component into the Parent Component inside script tag but above export default function declaration.

Raja Tamil (Firebase 9 + JavaScript: Build Full-Stack Web Apps Faster Course) 90% OFF UNTIL May 22, 2023