Nuxt watchQuery()

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2021 Feb 25 13:50
Editor
Edited
Edited
2021 Apr 13 5:46
Refs
Refs

get query

  • Type: Boolean or Array or Function (default: [])
 
 
  • bool - allow all or not
  • array - allow specific querycod
  • function - refine query
 
watchQuery(newQuery, oldQuery) { // Only execute component methods if the old query string contained `bar` // and the new query string contains `foo` return newQuery.foo && oldQuery.bar }
 
 
 
 
The new fetch hook introduced in 2.12 is not affected by watchQuery

Recommendations