Vue 3 Composition API
Plans from $25/month

This lesson is for members. Join us?

Subscribe now and get immediate access to this course, 30 more and all future Vue.js courses!

Refactoring for a More Versatile Composable

In this lesson, we create a useResource composable to handle the fetching logic and state for both posts and users.

Along the way, we get to see the flexibility composables provide when it comes to renaming data and functions to prevent naming collisions across composables.

Finally, we examine the ability to pass parameters to composables in order to make them even more versatile.