Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Reading data from the vuex store
export default {
computed: {
...mapGetters('messages', {
findMessagesInStore: 'find'
})
},
messages () {
const user = this.$store.state.auth.user
return this.findMessagesInStore({ query: { $or: [{ to: user._id }, { from: user._id }] } }).data
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.