props casing best practices - camelCase in templates ok? #454
Closed
theoephraim
started this conversation in
General
Replies: 1 comment
-
hooray! Thank you @NataliaTepluhina |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The official vue style guide suggests defining props using camelCase and then using them in components with kebab-case. While I have certainly gotten used to it, I am questioning whether it still truly makes sense...
I understand the reasoning to be:
On the flip side, keeping the name consistent has huge benefits when thinking about project-wide search, find/replace, and refactoring tools.
I'd also think that the DOM template issue does not apply to a huge number of vue users (especially power users), and that a counterpoint can easily be made for distinguishing between html attributes versus props - similar to the reasoning behind the suggestion to use PascalCase for component names.
Is there any appetite out there in the community to relax this recommendation and say it's acceptable to start using camelCase props in templates - with the caveat about DOM templates - very similar to what we have now with component naming.
Beta Was this translation helpful? Give feedback.
All reactions