I have a component. For this component I created css file with the description for the class "active" and imported it into the component. Also in this component I use NavLink from React Router. And NavLink gives for an element class "active", when user tapped this element.
In other component, which is fully separate, I also use NavLink. And there I didn't import css file with "active" class description. But all styles from the class "active" from the first component works also here. It means elements in this component don't look like they should.
Why it works so? And how I can make css file separate for each component?
Thank You.