Answer the question
In order to leave comments, you need to log in
Is it possible to make className dynamic in React?
Good time of the day.
I am working with scss modules and want to dynamically change classes like this:
import classes from './ItemForm.module.scss';
...
<div className={`${classes}.${itemStatus}`}>
{status}
</div>
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