The Delightful World of Vue
Creating a Child Component
  Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 2 / 2

Suppose we have an empty component that looks like this:

<template>
    <div></div>
</template>

<script>
export default {
    name: 'MainComponent',
};
</script>

We now want to import a child component (that lives at @/components/title-component) and render it inside MainComponent. What code would accomplish this?

Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.