score:1

Accepted answer
handleMenuLock = () => {
  this.setState((prevState) => ({ menuLocked: !prevState.menuLocked }))
}

score:1

  handlePageClick = () => {
    if (!this.state.menuLocked) {
      this.setState({
        menuOpen: false,
      });
    }
  }

Related Query

More Query from same tag