Answer the question
In order to leave comments, you need to log in
How to add a class to the root of a component?
There is a conditional <#Avatar/> component that has its own styling and all that.
Let's say that in some situation I need to add styling to the Avatar root element on top of the existing one, something like <#Avatar className="some-class" />
In vue, this class would simply be added to the root of the component, but how similar to do in react? Is it necessary to pass the class names with props and already in the component itself make sure that this prop is added to the class?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question