Option for className or class?
See original GitHub issueIt would be great if we could utilise class
instead of className
I utilize class
as I’m writing direct one to one with static html
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
HTML option class Attribute - Dofactory
The class attribute assigns one or more classnames to the <option> tag. Classnames are defined in a stylesheet or in a local <style>...
Read more >Why React uses className over class attribute
Explanation: The only reason behind the fact that it uses className over class is that the class is a reserved keyword in JavaScript...
Read more >get class name of a selected option - jquery - Stack Overflow
The selected selector is applicable for option , not for the select so $('select[name="platform"] :selected').attr('class'). Demo: Fiddle.
Read more >Element.className - Web APIs | MDN
The className property of the Element interface gets and sets the value of the class attribute of the specified element.
Read more >JSX: add option to use "class" instead of "className"
JSX: add option to use "class" instead of "className" · Type class in JSX · PhpStorm more or less automatically expands to React's...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m glad you can use the
css
. Fun fact,styled
uses the samecss
internally 😄 and just returns theclassName
.As a reference as well, because I’m targeting only static html, the difference of
setAttribute
and setting the property doesn’t change too much for me