[Solved] React stateless functional component to class Component


class Menu extends React.Component {
  render() {
    // you can use this.props.history anywhere in the class
    const { history } = this.props;
    return <AppBar>...</AppBar>
  }
}

export default withRouter(Menu);

solved React stateless functional component to class Component