Having some difficulty with css modules in react, I am unsure how to utilize react modules dynamically.
import classnames from 'classnames'
import styles from './hover.module.css
///
///
const [flashElements,setFlashElements]=useState(elementList.map(element => {
return element.classes.flash
}))
Is it possible to display the classes showing the value that corresponds to the element in state? Or should I consider a different approach?
I would like to achieve something similar to the code snippet below:
return (
<a classname={styles.HOVER ,styles.flashElements[i]}>