M
M
MRcracker2021-10-06 01:32:33
React
MRcracker, 2021-10-06 01:32:33

How to add a class to a component?

Good afternoon. Tell me how to solve the problem or refer, please, to the documentation, otherwise I can not find a solution.

There are two components in react. button and menu. It is necessary to make it so that when a button is clicked, a certain class is added and removed from the menu, so that the menu appears and hides. You need to do it through the class. There are styles for media queries.

Thanks to all

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Makarov, 2021-10-06
@MRcracker

Something like this https://codesandbox.io/s/heuristic-currying-jm0ur?...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question