The watchQuery property
Watch query strings and execute component methods on change (asyncData, fetch, validate, layout, ...)
- 
Type: 
BooleanorArrayorFunction(default:[]) 
Use the watchQuery key to set up a watcher for query strings. If the defined strings change, all component methods (asyncData, fetch(context), validate, layout, ...) will be called. Watching is disabled by default to improve performance.
If you want to set up a watcher for all query strings, set watchQuery: true.
export default {
  watchQuery: ['page']
}
 You can also use the function watchQuery(newQuery, oldQuery) to have more refined watchers.
export default {
  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
  }
}
 Warning: The new 
fetch hook introduced in 2.12 is not affected by watchQuery. For more information see listening to query string changes . 
        Edit this page on GitHub
        
      Updated at Wed, Apr 19, 2023
    
 
 
        N3-rd
       
 
        Adrien Zaganelli
       
 
        Mag
       
 
        Stefan Huber
       
 
        Olga Bulat
       
 
        Maciek Palmowski
       
 
        Sébastien Chopin
       
 
        Daniel Roe
       
 
        Clément Ollivier
       
 
        Paiva
       
 
        Florian Reuschel
       
 
        Rishi Raj Jain
       
 
        Savas Vedova
       
 
        Steven Soekha
       
 
        Vinícius Alves
       
 
        Kareem Dabbeet
       
 
        Valentín Costa
       
 
        Ryan Skinner
       
 
        Alex Hirzel
       
 
        Ajeet Chaulagain
       
 
        René Eschke
       
 
        Nico Devs
       
 
        Muhammad
       
 
        Nazaré da Piedade
       
 
        Naoki Hamada
       
 
        Tom
       
 
        Yann Aufray
       
 
        Anthony Chu
       
 
        Nuzhat Minhaz
       
 
        Lucas Portet
       
 
        Richard Schloss
       
 
        bpy
       
 
        Antony Konstantinidis
       
 
        Hibariya
       
 
        Jose Seabra
       
 
        Eze
       
 
        Florian LEFEBVRE
       
 
        Lucas Recoaro
       
 
        Julien SEIXAS
       
 
        Hugo
       
 
        Sylvain Marroufin
       
 
        Spencer Cooley
       
 
        Piotr Zatorski
       
 
        Vladimir Semyonov
       
 
        Harry Allen
       
 
        kazuya kawaguchi
       
 
        Unai Mengual
       
 
        Hyunseung
       
 
        Alexandre Chopin
       
 
        pooya parsa
       
 
        Nick Medrano
       
 
        Mosaab Emam
       
 
        Ilja
       
 
        Heitor Ramon Ribeiro
       
 
        Nero
       
 
        Yoon Han