className prop not working with custom DOM elements in 0.14.0-rc1
See original GitHub issueThe className
prop does not appear to get mapped correctly when applied to custom DOM elements in 0.14.0-rc1
.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:61 (20 by maintainers)
Top Results From Across the Web
Giving a className to a custom React component not ...
In OptionsMenu component you can use this prop and apply it as a className on a html DOM element (div/span etc). Or, in...
Read more >React v0.14 Release Candidate – React Blog
We're happy to announce our first release candidate for React 0.14! We gave you a sneak peek in July at the upcoming changes...
Read more >react-flip-move
This module was built to tackle the common but arduous problem of animating a list of items when the list's order changes.
Read more >Learn Raw React — no JSX, no Flux, no ES6, no Webpack…
This becomes a problem when React goes to re-render those elements, as it cannot tell one from another – and thus doesn't know...
Read more >CHANGELOG.md
Here are some highlights ✨: - Fix some important issues with the Modal ... `@material-ui/lab@v3.0.0-alpha.20` - [SpeedDialAction] Fix className prop ...
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 Free
Top 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
It works if you set
class
instead.cc @jimfb perhaps? (#3067 is related I assume)
@jimfb what we’re already seeing is that the change between standard DOM elements and custom element behaviour is counter intuitive and thats the point being made. You’d assume currently that using
className
would outputclass
because thats what happens everywhere else. Suddenly the behaviour changes because of a dash in the element name which is arbitrary. You’re assuming that the use of a dash means I want to create a web component that is going to have special handling of attributes. It’s currently counter intuitive which is why it keeps going around in circles. It seems like the extensive whitelisting is a result of the behaviour change added to custom elements where all props are mapped.It’s clear we all care about this stuff because react is probably the coolest framework around and we use it every day. So yeah people are going to get passionate about it because its so important. Whats important especially to us is the use of custom elements as standard html elements using the current 0.13 behaviour that had no prejudice between elements. All were equal. What we’re saying is that the non-equality proposed should be done using a setAttr rather than the current behaviour forking which seems wrong.