Home

Issue: 297

Understanding sub components and components and children

[issue link]

I’m think I’m having issues understanding how components work and need help sorting this out since the documentation is a little shortcoming.

I’m developing a multipage nuxt site and I have a bunch of components. Beside the obvious header and footer, I have other components that need to receive data from the page that the are placed on. I want to be able to handle the api calls on the components themselfs, but the page needs to deliver an id, for example.

This documentation https://nuxtjs.org/faq/async-data-components referes to

…giving the data as a prop to the subComponent

But I can’t find and reference to which prop or subComponent that would be, in the documentation. Is subComponent referred to a page child? Or is it possible to send data to components so they can handle logic, instead of having lots of duplicate logic on different pages?

This question is available on Nuxt.js community (#c255)