Import composition API items from "vue" instead of "@nuxtjs/composition-api" #815
Labels
💻 aspect: code
Concerns the software code in the repository
🧰 goal: internal improvement
Improvement that benefits maintainers, not users
🟨 priority: medium
Not blocking but should be addressed soon
🧱 stack: frontend
Related to the Nuxt frontend
Projects
Problem
Openverse started converting the Vue code to Composition API using the
@nuxtjs/composition-api
. This package will need to be replaced when we migrate to Nuxt 3. It is possible to start doing so now that we are using Vue 2.7 which has native support for the Composition API.Description
Almost all items we import from
@nuxtjs/composition-api
can be replaced with the same imports fromvue
. All items except the following list should be imported fromvue
:useMeta
useRoute
useRouter
useContext
ssrRef
Alternatives
We could postpone the change until the Nuxt 3 migration, but it will make the already complicated move more complex.
The text was updated successfully, but these errors were encountered: