0

in Vue 2 I can assign a prototype in main.js for example via Vue.prototype.$AppName in Vue 3 I can assign a prototype to for example app.config.globalProperties.appName but how can I get the prototype value in a component. I can't use this.appName like in Vue 2 because of the proxy

Gorilka
  • 484
  • 4
  • 15
  • Are you trying to access `appName` from within `setup()`? If so, see [duplicate question](https://stackoverflow.com/q/68060564/6277151). – tony19 Jun 21 '21 at 03:37
  • Does this answer your question? [Add global variable in Vue.js 3](https://stackoverflow.com/questions/63100658/add-global-variable-in-vue-js-3) – Estus Flask Jun 21 '21 at 06:04

0 Answers0