let { class } = this.props
Class is a reserved word. This is why they stuck with the dom attribute names. Because it is JS, not html :)
Class is a reserved word. This is why they stuck with the dom attribute names. Because it is JS, not html :)
If you need to merge it with some statically applied class names in your component you need to access it. This is an absolutely common thing. It would be terrible if i'd need to access it by using a string. And even then I would need to assign it to a name other then "class" which makes it even more confusing then naming it "className" by convention.