useQuasar() inside a .ts file returning null #16995
Closed
Answered
by
rstoenescu
brogits
asked this question in
General - Components / Directives / etc
-
Hi, I had been noticing that there are times when useQuasar() is returning null when executed inside a .ts file Line 324 still returns null even after executing useQuasar(). What could I be missing? Is there standard way of doing this inside a .ts file? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
rstoenescu
Mar 13, 2024
Replies: 1 comment 1 reply
-
If you're using |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
rstoenescu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're using
script setup
then you're ensured this error won't happen. However, otherwise just make sure that you are inside of yoursetup()
function when calling it -- and calling it while setup() is running at runtime, not afterwards. This is just how composables work.