https://codesandbox.io/s/38pzrn9nk1
asyncData() should be executed for new route, even if just query param value changes. in this case ?page=
URL changes, but new page load cycle is not started, thus asyncData() is not executed too
You must enable the watchQuery property on the page component. You can read about it here.
As @henriqemalheiros said :relaxed:
thank you very much for a quick response! Everything is working now!
@togishub How can I use the watchQuery property?thank you
My problem is that query parameter changes don't want to update data asynchronously.
ouyangfan, my example now includes working code with watchQuery property: https://codesandbox.io/s/38pzrn9nk1
see code at:
`
Most helpful comment
You must enable the
watchQueryproperty on the page component. You can read about it here.