83
rated 0 times
[
85]
[
2]
/ answers: 1 / hits: 17177
/ 4 Years ago, sun, august 2, 2020, 12:00:00
Anybody knows how to use mapState
or mapGetters
with Vue 3
in the setup
function ?
I know that is possible to use the store with the useStore
hook but with this hook We import all the store while with mapState
or mapGetters
we can specify a module
:
// ...
computed: {
...mapGetters('myModule', [
'myStateVariable'
]
)
//...
More From » vue.js