I have this code:
Код: Выделить всё
import styles from "../styles/dragdrop.module.css"; (...) return ( ); Код: Выделить всё
But I'm using CSS selectors in my front-end JS to do stuff with those divs:
Код: Выделить всё
const targetBox = e.target.closest(".dragDrop"); I could perhaps start using css selectors like div[class*="dragDrop"], but it seems like a bad idea.
How is this done properly?
Источник: https://stackoverflow.com/questions/781 ... -selectors
Мобильная версия