[Solved] React stateless functional component to class Component

[ad_1]

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);

[ad_2]

solved React stateless functional component to class Component