Skip to content

improve error message for non-reactive properties #6657

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
davidm-public opened this issue Sep 20, 2017 · 1 comment · Fixed by #6735
Closed

improve error message for non-reactive properties #6657

davidm-public opened this issue Sep 20, 2017 · 1 comment · Fixed by #6735

Comments

@davidm-public
Copy link

What problem does this feature solve?

current error message is non helpful for vue-class-component (js or ts):

if you forget to initialize a property then you get this error:

Property or method "xxx" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.

So of course with class based components there is no 'data option', so this isn't helpful.

Proposal is to change the error message:

Property or method "xxx" 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. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties

What does the proposed API look like?

no changes.

@znck
Copy link
Member

znck commented Sep 21, 2017

I like the idea of linking docs in error messages.

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

Successfully merging a pull request may close this issue.

3 participants