Access parametrized getter in setup store #2183
-
I have a pinia store that uses the setup syntax. It looks like this:
In my composable, I do the following:
How can I access the parametrized getter and pass a parameter to it? When using "This expression is not callable." Is this related to #1065? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi Walnussbaer. The intention of a Even if the example is not with the setup syntax, you can check this in the docs: https://pinia.vuejs.org/core-concepts/getters.html#passing-arguments-to-getters |
Beta Was this translation helpful? Give feedback.
It is not a different feature, if you want to receive a parameter, you should return a function. As far as i know is the same for Options and Composition API:
or
But of course this is not recommended because it loses the cache feature