The fetch method is not called when you access a child page directly.
Reproduction project: https://github.com/cretueusebiu/nuxt-fetch-issue
Start the project and open the console:
[email protected].[email protected]./child page, refresh the page and only [email protected] is shown.Is this the expected behavior ?
From looking at the code this line seems to prevent fetch from being called on the parent component.

@cretueusebiu What exactly are you expecting? When hard reload child page call [email protected] too?
I'm starting to use Nuxt recently, but for me, this is the expected behavior since index (home) and child are 2 different pages, with 2 different codes.
I normally use a middleware to make things globally. EG something need to happen in every page, like verify if the user is authenticated...
@gtso86 Yes.
@cretueusebiu got it...
When I disabled the mode: spa inside the nuxt.config.js and hard refresh the child page, I got both logs on my terminal, but still getting only the last one on devtools

Hi @cretueusebiu @gtso86
It seems to be a bug indeed, it should not call any fetch method on reload since everything is server-rendered.
I will take a look at it.
I just tried and universal mode is working perfecly:
/ -> [email protected] in server console/child -> [email protected]and[email protected]` in server console/ to /child -> only [email protected] in client consoleBut with spa mode (only client console):
/ -> [email protected] in console/child -> only[email protected]` in console == BUGWoking on it :)
It's fixed with https://github.com/nuxt/nuxt.js/commit/fed644ddf68717191bdef43f12946139b81e6c9c
Will be available in rc6 :)
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.
Most helpful comment
It's fixed with https://github.com/nuxt/nuxt.js/commit/fed644ddf68717191bdef43f12946139b81e6c9c
Will be available in
rc6:)