K
K
konstantinst132021-03-22 11:51:18
React
konstantinst13, 2021-03-22 11:51:18

How to use JavaScript class along with React class?

I have a burger menu class written in JS. It has different settings. I want to use it in my React app. I want the menu button (it is a separate component) to go off the screen when the menu button is pressed and return back when pressed again. I wrote this functionality in the JS class.
Now how do I use this JS code in a React class?
I don't want to put a lot of code into some React class methods.
Is it possible somehow to import my Burger menu class into a React class and use them together?

Here is my written Burger Menu class :
https://github.com/konstantinstepanyan/Menu-Toggler

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