2
runtime-core.esm-bundler.js?d2dd:38 [Vue warn]: Extraneous non-props attributes (title) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. 
  at <ProductTable title="Product List" > 
  at <Home onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView> 
  at <App> 

This is the error I get in the chrome console of my Vue app. Below is my parent view component. I am trying to add multiple components to it, e.g home content and footer.

<template>
  <div class="home">
    <ProductTable title="Product List"/>
    <Footer title="I am the child"/>
  </div>
</template>

<script>
import ProductTable from '@/components/ProductTable.vue'
import Footer from '@/components/Footer.vue'
import Functions from '@/components/ProductListFunctions.js'


export default {
  name: 'Home',
  components: {
    ProductTable,
    Footer
  }
}
</script>


Any help is appreciated as I cant figure it out. The error is just a warning and doesn't effect any of the page. But it would be nice to be gone. Cheers.

Travis B
  • 57
  • 1
  • 8

1 Answers1

4

You should add inheritAttrs:false to the child components:

export default{
inheritAttrs:false
...
}

Boussadjra Brahim
  • 82,684
  • 19
  • 144
  • 164