What is needed to support getters with parameters?
See original GitHub issueHi there!
What would need to be done in order to support getters with parameters, and how should they work ideally?
How do they differ from actions? Is there a way where you could return a computed
from an action in order to mimic the same functionality?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
vuexjs getter with argument - Stack Overflow
This should be the accepted answer as a) it answers the question, and b) it doesn't promote bad practices. Accepted answer is just...
Read more >How to pass parameters to the function in getters #688 - GitHub
Use a getter to 'shape' the data into what's needed by your app. 3
Read more >Getters | Vuex
The mapGetters Helper. The mapGetters helper simply maps store getters to local computed properties: import { mapGetters } from 'vuex' export ...
Read more >How do you pass a parameter to a getter method?
Say I want to pass a parameter to a getter method statically in my visualforce code. For example: <apex:pageBlockTable value="{!
Read more >Vuex Getter With Parameters In TypeScript
Vuex supports “method-style” getters which are getters that return a function with one or more parameters. ... In this example, the getter returns ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s fine, lol
I was more thinking about replacing that 15 in the example with the
computed
:But sometimes that’s not possible because the variable comes from a loop, so you have to use the action in the template, in that case you return a function that calls the action in
setup
:and then use it in the template
hello. I don’t think getters with parameters are worth anymore. They are just methods. Otherwise it would mean creating some kind of internal Map of computed properties depending on the parameters