useQuasar for Quasar v1/Vue 2 with composition api? #8973
Answered
by
metalsadman
lyle45
asked this question in
General - Components / Directives / etc
-
|
Hi, is there a composition hook like useQuasar for Quasar v1/Vue 2 with composition api, or is the only way to access quasar instance is like so? async setup(props, ctx) {
const q = ctx.root.$q
}, |
Beta Was this translation helpful? Give feedback.
Answered by
metalsadman
Apr 20, 2021
Replies: 1 comment
-
|
Nope, no useQuasar in qv1. You can import from quasar what you need out of the $q context, ie. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rstoenescu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nope, no useQuasar in qv1. You can import from quasar what you need out of the $q context, ie.
import { Dialog } from 'quasar',setup() { Dialog.create(...) }. I would prefer it this way (a bit of boilerplate) than using the context.root from setup param as that one is deprecated.