Answer the question
In order to leave comments, you need to log in
How do you reach pseudo-elements (::after,::before), ref in React?
Hello, I’m making an adaptive in a mini application on react, and I had to reach the component in which the burger menu, when clicked, turn on the mobile navigation (I think it’s understandable), I googled that you can reach it using ref’ov - I did it, BUT I want the burger button when the click became a cross and back, I wrote everything manually (1 span and two pseudo-elements inside it: after, before) so how do I get through to these pseudo-elements so that when they click, change their styles ?? Is it possible with refs? I don’t know how, or is it impossible to make such a burger menu on react? I don’t want to do a pop-up menu on the side, I’m new to React, I hope the essence of the issue is clear, thanks in advance)
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