Composition typescript error accessing this on computed
#2623
-
|
Related: #1151 I'm using composition api to define store. Is there any way to access |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Why do you even need selectedNodeData: computed(() => getNodeData)If you mean you need component's instance which utilizes your composable you can use getCurrentInstance api, but this is definitely a bad practice and I don't recommend doing so. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! The |
Beta Was this translation helpful? Give feedback.


Why do you even need
thisin setup stores? If thegetNodeDatamethod is defined somewhere above, just access it as any local identifier:If you mean you need component's instance which utilizes your composable you can use getCurrentInstance api, but this is definitely a bad practice and I don't recommend doing so.