#Best practice for fetching data updating url for copy/paste and url sharing purpose
1 messages · Page 1 of 1 (latest)
I have a watcher on these properties which I want to navigate to... the problem is that the reactivity of the body occurs before the navigation therefore triggering 2 different request to the api the one from the the body changing and then the one from the page initial load
@frosty warren Ive been watching all your great youtube videos and they helped a lot. If ever you have thoughts on this I would really appreciate. Thank you
Try using useRouteQuery and potentially passing an option “mode: ‘replace’”
This will give you a reactive version of your query parameter that will auto update the url when you change it
Oops… meant https://github.com/vueuse/vueuse/blob/main/packages/router/useRouteQuery/index.ts, not useRouteParams
thanks for your answers guys... I think its a reactivity issue where the computed prop body recalculates too many times based on its dependencies