Skip to content
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

Add note on .sync camelCasing in documentation #1648

Closed
robertjk opened this issue May 24, 2018 · 3 comments
Closed

Add note on .sync camelCasing in documentation #1648

robertjk opened this issue May 24, 2018 · 3 comments

Comments

@robertjk
Copy link

robertjk commented May 24, 2018

What problem does this feature solve?

The problem is that the documentation on Custom Events: Event Names states:

we recommend you always use kebab-case for event names.

With .sync modifier you must emit event update:propertyName with propertyName camelCased. With kebab-case it doesn't work at all. So in the quoted text it's not always: more like always unless you emit event for .sync.

What does the proposed API look like?

You should add a note about that in Custom Events: Event Names.

Also in the documentation Custom Events: .sync modifier I would change the example to use a property with multiple word name (now it's a single word title, which doesn't help with this problem) and/or add a note about this event name incosistency with previous recommendation on the same page ("always use kebab case").

@chrisvfritz
Copy link
Contributor

Thanks for bringing this up. 🙂 I think I have a compromise change would allow $emit('update:property-name') to work without any breaking changes. We're discussing it now internally, but I'll add a note if it ends up not being possible.

@robertjk
Copy link
Author

Alright :).

@NataliaTepluhina
Copy link
Member

Closing as related PR was merged

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