import React, { Component } from 'react'; import Button from '@material-ui/core/Button'; import Menu from '@material-ui/core/Menu'; import MenuItem from '@material-ui/core/MenuItem'; import toRenderProps from 'recompose/toRenderProps'; import withState from 'recompose/withState'; const WithState = toRenderProps(withState('anchorEl', 'updateAnchorEl', null)); class LoggedInUserMenu extends Component { constructor(props){ super(props); this.state = { property: 'value' } } render() { return ( {({ anchorEl, updateAnchorEl }) => { const open = Boolean(anchorEl); const handleClose = () => { updateAnchorEl(null); }; return ( Profile My account Logout ); }} ); } } export default LoggedInUserMenu;