-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Description
Version
3.1.1
Reproduction link
https://gitlab.com/Xambey/large
Steps to reproduce
- Run the application.
- Open console in web browser (or vue extensions)
- Catch the error in the log (ChildA.vue: 14 )
"Property or method "score" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property"
found in
---> at src/components/ChildA.vue
at src/components/Parent.vue
at src/App.vue
What is expected?
The getter 'score' is created in my component. (this.$store.getters['scoreBoard/score'] -> this.score)
What is actually happening?
Getter no mapped, vue google chrome extension show what state existed https://i.imgur.com/QKB7Wqm.png
computed: {
...mapGetters([
'scoreBoard/score' // Not found when /scoreBoard/score is existed.
])
}
if you do this, then everything works (or namespaced = false):
computed: {
...mapGetters({
score: 'scoreBoard/score'
})
}
Metadata
Metadata
Assignees
Labels
No labels