The watchParam property

Watch param change and execute component methods on change (asyncData, fetch(context))


  • Type: Boolean (default: undefined)

Use the watchParam key to set up a watcher for route params. If the params change, asyncData and fetch(context) will be called. Watching is enabled by default.

If you want to disable watching for params, set watchParam: false.

export default {
  watchParam: false
}
By default nuxt.js reset page component data state after route param change, you can use watchParam: false to disable this behaviour.
Warning: The new fetch hook introduced in 2.12 is not affected by watchParam. For more information see listening to query string changes for params is the same.