How to style components using makeStyles and still have lifecycle methods in Material UI?
Hi instead of using hook API, you should use Higher-order component API as mentioned here I’ll modify the example in the documentation to suit your need for class component import React from ‘react’; import PropTypes from ‘prop-types’; import { withStyles } from ‘@material-ui/core/styles’; import Button from ‘@material-ui/core/Button’; const styles = theme => ({ root: { … Read more