Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
La función de uso de Vue 3 no funciona

Intenté actualizar una de mis aplicaciones de Vue 2 a Vue 3. Lamentablemente, no puedo usar: la función Vue.use() . Por ejemplo, mi código en Vue 2:

 import Vue from 'vue' import App from './App.vue' import store from './store' import router from './router' import VueCookie from 'vue-cookie' Vue.use(VueCookie); new Vue({ store, router, render: h => h(App) }).$mount('#app')

Lo mismo en Vue 3:

 import { createApp } from 'vue' import App from './App.vue' import router from './router' import { store } from './store' import VueCookie from 'vue-cookie' //Vue.use(VueCookie); //old line in vue 2 createApp.use('VueCookie'); //this is not works and return error createApp(App).use(router,store).mount('#app') //Is this line correct?

¿Que me estoy perdiendo aqui?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Intente lo siguiente, primero defina la aplicación y luego úsela:

 import { createApp } from 'vue' import App from './App.vue' import router from './router' import store from './store' import VueCookie from 'vue-cookie' const app = createApp(App); app.use(router); app.use(store); app.use(VueCookie); app.mount('#app')
about 4 years ago · Juan Pablo Isaza Report

0

Puedes usarlo como:

 import VueCookie from 'vue-cookie' VueCookie.set("mycookie", "value", "1h")
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!