DEV Community

Discussion on: Quick Vue Tip: Cleaner Data Fetching

pholly profile image
Philip Holly

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.

mccabiles profile image
Miguel Author

Happy to hear it helped!