Static GitHub Issues

[2444] in nested routes parent page data resets

prev: nuxtServerInit() not respond to Local API URL
next: Video.js doesn't work when route on client

when you have a nested page route using nuxt-child, the data set on the parent page resets to the default when you change route of the child.

pages

  • parent
    • child.vue
    • child2.vue
  • parent.vue

if parent has data of

{ toggled: false }

and you set toggled to true and change the child route, toggled will go back to false.

expected behavior

the parent data should stay and only reset if the parent is remounted.

<!--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/c2119">#c2119</a>)</em></sub></div>