Open minotaurrr opened 6 years ago
Hi,
I noticed no redux action is fired when I close the menu.
class SideMenu extends React.Component { componentDidMount() {} render() { return ( <Menu customBurgerIcon={false} isOpen={this.props.isOpen} pageWrapId={'page-wrap'} outerContainerId={'outer-container'} > <span>test</span> </Menu> ); } } const mapStateToProps = state => ({ isOpen: state.burgerMenu.isOpen, }); export default connect(mapStateToProps)(reduxBurgerMenu(SideMenu));
I have another component that has a button which fires the toggleMenu action like so:
class AnotherClass..... { render() { return( ....<Button onClick={() => toggleMenu(isOpen)}>Open Menu</Button> ) } }
I'm using the following
"react": "^16.6.0", "react-redux": "^5.1.0", "redux": "^4.0.1", "redux-burger-menu": "^0.2.8", "react-burger-menu": "^2.5.4",
The initial state for isOpen is false so the button works only the first time. When the menu is closed isOpen stays true since no action is fired so the button doesn't work anymore.
Anyone experienced a similar issue?
Hi,
I noticed no redux action is fired when I close the menu.
I have another component that has a button which fires the toggleMenu action like so:
I'm using the following
The initial state for isOpen is false so the button works only the first time. When the menu is closed isOpen stays true since no action is fired so the button doesn't work anymore.
Anyone experienced a similar issue?