U
U
uRoot2020-06-29 19:57:15
React
uRoot, 2020-06-29 19:57:15

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 ),

This was before CSS modules. How to do the same if modules are used?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question