Skip to content

Vuex getter won't evaluate #1039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spvky opened this issue Aug 14, 2018 · 2 comments
Closed

Vuex getter won't evaluate #1039

spvky opened this issue Aug 14, 2018 · 2 comments

Comments

@spvky
Copy link

spvky commented Aug 14, 2018

🐛 bug report

In a vue project using vuex for state management, a simple getter is failing to evaluate and is instead
therfore:

store.js
`import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default {
state: {
counter: 10
},
getters: {
counter: state => {
return state.counter;
}
}
};`

when called this getter returns:

function counter(state) { return state.counter; }

instead of the value 10
Link to my sandbox https://codesandbox.io/s/kw2wox9mlr

Software Name/Version
Сodesandbox
Chrome (latest stable release)
Operating System (Windows 10)
@FossPrime
Copy link

Looks like you fixed it?

@SaraVieira
Copy link
Contributor

Closing as issue seems to be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants