Closed Epyon616 closed 4 years ago
Hey @LeeDownshift, if you're using the default button, it doesn't need a toggle function added manually. It will already open the menu.
If you want to keep track of the menu state externally and use the isOpen
prop, you should instead listen for the state change event (using onStateChange
).
Here's an example of how that might look (just without the CustomIcon
): https://github.com/negomi/react-burger-menu/wiki/FAQ#i-want-to-control-the-open-state-programmatically-but-i-dont-understand-how-to-use-the-isopen-prop
After following the documentation on, I have got a menu and the default burger menu button, however it is not clear how I'm supposed to add my toggle function to this button, if I currently click the menu button nothing happens, but if I add another button and give it an onclick method to toggle isOpen it works fine.
Am I missing something?
Thanks in advance