Static GitHub Issues

[127] Async data on components

prev: SyntaxError: Unexpected token import - Private npm module
next: nuxt-link-active stays active

Loading data with axios only work in a page not in a component: See this example: https://github.com/danieloprado/nuxt-async-data

image

[Vue warn]: data functions should return an object:
https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function 
(found in component <category-header-component> at /home/daniel/projects/tegra-ecommerce-site/app/components/CategoryLinks.vue)
warn @ vue.runtime.common.js:521
initData @ vue.runtime.common.js:1901
initState @ vue.runtime.common.js:1848
Vue._init @ vue.runtime.common.js:3365
VueComponent @ vue.runtime.common.js:3485
createComponentInstanceForVnode @ vue.runtime.common.js:2761
init @ vue.runtime.common.js:2771
createComponent @ vue.runtime.common.js:4122
createElm @ vue.runtime.common.js:4065
updateChildren @ vue.runtime.common.js:4335
patchVnode @ vue.runtime.common.js:4398
updateChildren @ vue.runtime.common.js:4314
patchVnode @ vue.runtime.common.js:4398
patch @ vue.runtime.common.js:4523
Vue._update @ vue.runtime.common.js:2497
(anonymous) @ vue.runtime.common.js:2464
get @ vue.runtime.common.js:1661
run @ vue.runtime.common.js:1730
flushSchedulerQueue @ vue.runtime.common.js:1544
(anonymous) @ vue.runtime.common.js:473
nextTickHandler @ vue.runtime.common.js:422
vue.runtime.common.js:521 

[Vue warn]: Property or method "title" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option. 
(found in component <category-header-component> at /home/daniel/projects/tegra-ecommerce-site/app/components/CategoryLinks.vue)
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c105">#c105</a>)</em></sub></div>