Replies: 3 comments 1 reply
-
I use hyphens for attributes and camelCase for properties as you mentioned. I don't find it unnecessarily complex since you access attributes and properties quite differently. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I use camelCase for properties and hyphen-lower-case for attributes, I find it helps be clear about which I'm setting: @Property({ attribute:"video-id" })
declare videoId: string;
@Property({ attribute:false })
declare videoOptions: VideoOptionsInterface; Then it's clear in my usage:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
a custom property is "data-" |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is their a preference for hyphens attribute properties?
@Property({ attribute:"video-id" }) videoId: string;
vs
@Property() videoId: string;
Hyphens seem more correct for attributes.
camelCase seems more correct for properties
however does it make it unnecessarily complex when both are so entwined with each other?
Beta Was this translation helpful? Give feedback.
All reactions