Hi!
I use latest nuxt and i have problem with double initialize component which rendering in layout .
I have layout named "main" and default route ("/") which must rendered in the "main layouts" using component "logreg.vue".
When default route rendering i see 3 initialization logreg.vue component.

layouts/main.vue

pages/index.vue

result after loading page

nuxt.config.js
Sorry for concern but did not find a solution to this problem
Would you mind offering a demo repo, so that we can reproduce the issue ?
Hi! I create demo repo https://github.com/Gimanh/handscream_front/tree/nuxt/web .
sorry, I didn't reproduce this issue, following is the steps:


If I missed anything, pls let me know 馃槃
Sorry i do not know what i am doing wrong ... I reinstalled all node_modules.
Can you give me your nuxt.config.js?
First my error (nuxt-child) was in the main layout, i remove (nuxt-child) and see only 2 created log.

Then i comented (mode: 'spa') in nuxt.config.js

and see only 1 initialization .

Is it possible to use a SPA mode with a layout?
I didn't change anything in you nuxt.config.js.
Did your local codes are different from github ?
Because your github code's layout is not main.
Did your local codes are different from github ? No. Same code from ( https://github.com/Gimanh/handscream_front/tree/nuxt/web/hsnuxt )
Because your github code's layout is not main. What do you mean?
Here is video https://www.youtube.com/watch?v=Y8VD38WHe0g&feature=youtu.be :)
Because your github code's layout is not main. What do you mean?
I cloned the repo yesterday, but didn't find layout: 'main', I will update the repo and try again
@Gimanh
I updated the codes and reproduced the issue, this issue has been fixed in https://github.com/nuxt/nuxt.js/commit/9e4f864e4d25af2e9668767bb297182656e19cba and will be available in next rc release.
Thank you for your time and patient assistance馃樃
BTW, if you want to make a verification or quick fix, you man delete or comment fixPrepatch.call row in .nuxt/client.js: render.call as the commit I mentioned above did.
if (!path) {
normalizeComponents(router.currentRoute, router.currentRoute)
// fixPrepatch.call(_app, router.currentRoute, router.currentRoute)
mountApp()
return
}
Thanks for the help and for NUXT! :)
Sorry :) But this
if (!path) {
normalizeComponents(router.currentRoute, router.currentRoute)
// fixPrepatch.call(_app, router.currentRoute, router.currentRoute)
mountApp()
return
}
is help if i commented (mode: "spa")
I recorded a video with a situation
https://www.youtube.com/watch?v=1rPwJwB85-w&feature=youtu.be
This is related to https://github.com/nuxt/nuxt.js/issues/1929, will also be fixed in next release.
clarkdo thanks, i will wait next release! Have a good day!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.