Closed ceich closed 5 years ago
Hi @ceich,
That's probably because your page is refreshing when you use <a>
tags, but not with React Router links.
To use the menu with React Router, you'll want to control the menu open state manually, so you can tell it to close when a link is clicked. See here for how to do that: 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
Thanks, I saw that but didn't make the connection. Will proceed as indicated.
When my menu items are React Router Link components, the menu stays open after I click on the link.
When my menu items use <a>, the menu closes as expected.
I am using version 2.6.4 so I don't think the 1.x FAQ item applies.