-1
I have a simple code in Vuejs and I need to import a component. I took a look at the documentation and looked it up online, but I can’t see where I’m going wrong.
From what I understand, just use the component name as a tag, right? So why do I keep getting error no-unused-vars
?
The export:
<script>
export default {
name: "HelloWorld",
props: {
msg: String
}
};
</script>
Importing:
import HelloWorld from "./components/HelloWorld"
And a part of the place where I call the component:
<template>
<div>
<div id="slogan" class="text-center">
<h1>NameGator <span class="fa fa-coffee"></span></h1>
<br/>
<h6 class="text-secondary">Gerador de nomes utilizando <kbd>Vue.JS</kbd></h6>
</div>
<HelloWorld></HelloWorld>
I didn’t want to add all the code because it would be too long, and that’s not my goal.
All right, I just let that detail go.
– ketts