Answer the question
In order to leave comments, you need to log in
How to execute querySelector in CSS module in React framework?
When the button is clicked, the following function is triggered:
const target = event.currentTarget.closest(".item"),
name = target.querySelector(".item__name").innerText,
price = parseInt( target.querySelector(".item__price").innerText ),
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