Skip to content

Trying to access non-existent property **** while rendering. #269

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
FKobus opened this issue Aug 5, 2016 · 4 comments
Closed

Trying to access non-existent property **** while rendering. #269

FKobus opened this issue Aug 5, 2016 · 4 comments

Comments

@FKobus
Copy link

FKobus commented Aug 5, 2016

Hi,

I'm trying to get Vuex working with the new Vue.js 2.0.0 build. But when I'm running the counter example I keep getting the following errors after building the code with webpack:

vue.common.js:2232[Vue warn]: Trying to access non-existent property "count" while rendering. Make sure to declare reactive data properties in the data option. (found in component <Counter>)
The same error occurs for: increment, decrement, incrementIfOdd, incrementAsync

It seems that vuex is not working as expected... I can upload my code to a github repo if needed

I'm using:
"vue": "^2.0.0-beta.6",
"vuex": "^2.0.0-rc.4",

@ktsn
Copy link
Member

ktsn commented Aug 6, 2016

I cannot get the error when I run the examples in this repo.
Can you share the reproduction code?

@FKobus
Copy link
Author

FKobus commented Aug 6, 2016

https://github.com/FKobus/vuerry/

I uploaded my project. It's just a copy of the example to a more real setup for a project. I'm currently maintaining a project in Vue 1.0.26 with an elastic search backend. I want to rebuild the app to Vue 2.0 with Vuex

@ktsn
Copy link
Member

ktsn commented Aug 6, 2016

vuex option in Vue's component option is deprecated on Vuex 2.0. And also actions and getters API is changed.
You can use mapGetters and mapActions instead.

Please see 2.0.0-rc.1 release note, 2.0 design discussion thread and examples on next branch.

@ktsn ktsn closed this as completed Aug 6, 2016
@FKobus
Copy link
Author

FKobus commented Aug 6, 2016

Got it working.. Probably copy pasted the 'old' example.

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

2 participants