I'm relatively new to React and currently working on a large project. I've run into an issue where I can't use both class
and className
on all elements and components, particularly custom ones. To work around this, I've had to place the className in a div container, although it doesn't feel like the best practice.
https://i.sstatic.net/GKOHg.png
Coming from Angular and Vue backgrounds, where I could easily apply classes using class
or [class]
, this limitation feels odd. Are there specific scenarios that would prevent me from using class
and className
on a component or element in the template?