[Vue warn]: Property "$id" was accessed during render but is not defined on instance. #2060
Unanswered
d-ryabtsev
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This error seems to be coming up everywhere now that we have moved to Vue 3. This is just 1 example where I am observing it.
Here's a code example:
It doesn't seem to like the way I am using
canView
which is technically is an action which is imported from the pinia module. It looks like this:However.. if I turn the action into a computed property, the warning goes away:
Does anyone have any tips? It seems that it is looking for $id on the component instance but it is undefined. It seems that it is unhappy with me exporting an action which uses computed properties inside to generate state. I would have thought that I shouldn't have to export something as computed if it needs a parameter?
Beta Was this translation helpful? Give feedback.
All reactions