Thanks for this. For routing params, I made them component props and watch the props. I found this article because I wanted to confirm if it's good practice to fetch data in just the watcher and not in created as well. Makes sense to do it in just the watcher using immediate, unless other setup needs to be done when the component is created before making the api call.
Thanks for this. For routing params, I made them component props and watch the props. I found this article because I wanted to confirm if it's good practice to fetch data in just the watcher and not in
created
as well. Makes sense to do it in just the watcher usingimmediate
, unless other setup needs to be done when the component is created before making the api call.Happy to hear it helped!