Feature Request: Convert "class" param to "className" #521
Archmonger
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
I don't think this is something I'm going to change since the interpretation of attributes is up to the client implementation. It happens that we're using React and that it expects |
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
-
Since IDOM uses python dicts for HTML attributes, there isn't any technical limitations to using
"class"
as an equivalent to react's"className"
.className
is used within React to avoid theclass
keyword, but that isn't needed within IDOM.Automatically converting
{ "class": ... }
to{ "className": ... }
in the backend would clean up the syntax a bit.Current Behavior
If
{ "class": ... }
is passed in, a warning is provided that it's an invalid parameter.New Behavior
If
{ "class": ... }
is detected, pop it from the dict and add its values to{ "className": ... }
Beta Was this translation helpful? Give feedback.
All reactions