You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: fixed a rule for prop casing
* fix: added CAPI example to simple expressions
* chore: added CAPI examples for computed
* fix: made notes about consistency
Copy file name to clipboardExpand all lines: src/style-guide/rules-strongly-recommended.md
+93-4Lines changed: 93 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -529,36 +529,72 @@ components/
529
529
530
530
## Prop name casing {#prop-name-casing}
531
531
532
-
**Prop names should always use camelCase during declaration, but kebab-case in templates and [JSX](/guide/extras/render-function.html#jsx-tsx).**
533
-
534
-
We're simply following the conventions of each language. Within JavaScript, camelCase is more natural. Within HTML, kebab-case is.
532
+
**Prop names should always use camelCase during declaration. When used inside in-DOM templates, props should be kebab-cased. Single-File Components templates and [JSX](/guide/extras/render-function.html#jsx-tsx) can use either kebab-case or camelCase props. Casing should be consistent - if you choose to use camelCased props, make sure you don't use kebab-cased ones in your application**
0 commit comments