Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

106
Views
Vue not rendering child component

I get this error trying to rendering a Vue test code on the browser:

[Vue warn]: Failed to resolve component: custom-input If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

custom-input is the child component I created.

app.component('custom-input ', {
  template: `
    <div>
      <label> 
        {{ label }}
        <input type="text" />  
      </label>
    </div>
  `,
  props: ['label']
})

It's parent is login-form.

app.component('login-form', {
  template: `
  <div>
    <form @submit.prevent="handleSubmit"> 
      <h1> {{ title }} </h1>
      <custom-input type="email" v-bind:label="emailLabel" /> 
      <custom-input type="password" v-bind:label="passwordLabel" />
      <button>Log in</button>
    </form>  
  </div>
  `,
  components: ['custom-input'],
  data () {
    return {
      title: "Login Form",
      email: '',
      password: '',
      emailLabel: 'Email',
      passwordLabel: 'Password',
    }
  },
  methods: {
    handleSubmit() {
      console.log(this.email + "\n" + this.password)
    }
  }
})

As you can see, I'm using the custom-input tag twice in the login-form component, but I get the error I mentioned before, and they do not render, I just get the rest of the login-form template HTML code.

error

The error says that I got to exclude the custom component from the component resolution, so I added the line of code:

app.config.compilerOptions.isCustomElement = (tag) => tag.includes('custom-input');

But then I got the same result but without the warning message.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!