O
O
Olga2017-10-12 16:03:35
JavaScript
Olga, 2017-10-12 16:03:35

How to use react js to apply a class on button click?

It is necessary that when the button is clicked, a new class is applied to the container

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Gamega, 2017-10-12
@melkaya94

put a variable in the state by clicking on the button, change it, in the rendering of the className component, you do it depending on the variable in the state

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question