score:1

Accepted answer

you are not doing anything with the passed onclick event. you need to put it on something, like so:

const sidebar = (props) => (
  <div onclick={this.props.onclick} classname={classes.sidebar}>
    <logo />
    <nav>
      <navigationitems />
    </nav>
  </div>
);

export default sidebar;

this will fire that event when you click on the div. make sense?


Related Query

More Query from same tag