Answer the question
In order to leave comments, you need to log in
How to define more than one css module class in React?
import root from './root.module.scss';
<header className={root.classFirst, root.classSecond}>
Answer the question
In order to leave comments, you need to log in
If they are strings, then just
const root = {
classFirst: `foo`,
classSecond: `bar`,
};
<header className={`${root.classFirst} ${root.classSecond}`} />
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question