Skip to content

Composition typescript error accessing this on computed #2623

Closed Answered by Ilanaya
iyume asked this question in Help and Questions
Discussion options

You must be logged in to vote

Why do you even need this in setup stores? If the getNodeData method is defined somewhere above, just access it as any local identifier:

    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.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@posva
Comment options

Answer selected by posva
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants