Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import composition API items from "vue" instead of "@nuxtjs/composition-api" #815

Closed
Tracked by #411
obulat opened this issue Mar 1, 2023 · 0 comments · Fixed by #816
Closed
Tracked by #411

Import composition API items from "vue" instead of "@nuxtjs/composition-api" #815

obulat opened this issue Mar 1, 2023 · 0 comments · Fixed by #816
Assignees
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

Comments

@obulat
Copy link
Contributor

obulat commented Mar 1, 2023

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 from vue. All items except the following list should be imported from vue:

  • 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.

@obulat obulat added 🟨 priority: medium Not blocking but should be addressed soon 💻 aspect: code Concerns the software code in the repository 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🧱 stack: frontend Related to the Nuxt frontend labels Mar 1, 2023
@obulat obulat self-assigned this Mar 1, 2023
@openverse-bot openverse-bot added this to Backlog in Openverse Mar 1, 2023
Openverse automation moved this from Backlog to Done! Mar 3, 2023
@zackkrida zackkrida mentioned this issue Mar 7, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Archived in project
Openverse
  
Done!
Development

Successfully merging a pull request may close this issue.

1 participant