Skip to content

Conversation

@ktsn
Copy link
Member

@ktsn ktsn commented Mar 1, 2017

As pointed out on #67, we may need to mention about caveats of class property definition. I've added it in docs on this PR.

README.md Outdated
}
```

You can simply define a method instead of a class property in that case:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not standard JavaScript pattern. It only works in Vue because the library binds it. It might be good to point this out in case readers do not know it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this out. Fixed 🙂

README.md Outdated

### Caveats of Class Properties

vue-class-component corrects class properties as Vue instance data by instantiating the original constructor under the hood. While we can define instance data like native class manner, we sometimes need to know how it works.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

collects?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes.

@ktsn ktsn merged commit 34ef0ce into master Mar 2, 2017
@ktsn ktsn deleted the docs-property branch March 2, 2017 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants