Static GitHub Issues

[1754] Nested page component not re-rendered when data is updated

prev: How to refresh the page
next: Build and generate command results to "require is not defined" error

I have dynamic nested route /pages/users/_id.vue. I use asyncData to fetch the data from server.

  async asyncData ({ app, params }) {
    try {
      let { data } = await app.$axios.get(`/users/${params.id}`)
      console.log('data arrived')
      return { user: data.data }
    } catch (e) {
      console.log(e)
    }
  },
template>
  <div>
      <h3 class="semi-bold">
        {{ user.firstname) }} {{ user.lastname }}
      </h3>
   </div>
</template>

I navigate to localhost:3000/users/50 the page is rendered correctly. Then I navigate to other user page localhost:3000/users/567 the asyncData is executed and new user returned but the view is not re-rendered...

Is this a bug ?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This bug report is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1575">#c1575</a>)</em></sub></div>