Nuxt.js: Current page component is created again when switching layout

Created on 7 Feb 2017  Â·  4Comments  Â·  Source: nuxt/nuxt.js

When you change to a page with a different layout the current page component is created again. This does not seems to be intentional? Let's say the current page will fetch some data using the created method, the problem is the the fetch will happen again when switching layout.

Example from custom layouts:

layouts

This bug report is available on Nuxt.js community (#c185)
available soon bug-confirmed

Most helpful comment

Good news, it will be fixed in the new release 0.9.10!

Before:
layout-bug

After:
aftereach-layout

All 4 comments

Associated to this bug:

By @mkv27 on #237

How can I get layout switch at the same time of page content switch?.
Currently when I use the layout switch is immediately, but the previous page content wait for new page content is loaded.

Example: When I routing for a new page with an async data, the layout change but the previous page content still alive(with "glitch" new layout) until new page data its ready.

Good news, it will be fixed in the new release 0.9.10!

Before:
layout-bug

After:
aftereach-layout

The 0.10 release it out ✋

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vadimsg picture vadimsg  Â·  3Comments

surmon-china picture surmon-china  Â·  3Comments

vadimsg picture vadimsg  Â·  3Comments

bimohxh picture bimohxh  Â·  3Comments

o-alexandrov picture o-alexandrov  Â·  3Comments