What are the code styling conventions for rsx code? #5148
danieldaquino
started this conversation in
General
Replies: 2 comments 1 reply
-
|
@ealmloff, would you happen to have some context on when to use each styling convention? Thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
elements are always lowercase, component should be upper camel case with snake case attributes like structs. Built in events are smushed case (like |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Good evening!
I noticed that native HTML elements tend to use
lowercasefor HTML tag names, andlowercasewith no separators for attribute names.Example from this documentation page:
However, components from Dioxus Primitives use
UpperCamelCasefor component names, andsnake_casefor attributes.Example from https://dioxuslabs.com/components (Alert Dialog):
What are the conventions for rsx code? When should I use one convention vs. another?
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions