Mastering Development

Use Material-UI HOC in Class Component

I’m trying to use material UI in my class component, instead of converting everything to Hooks. I’m not sure which method is easier, Hooks or retro-fitting what I have. Here’s my code: class App extends Component { constructor(props) { super(props); this.state = { hits: [], desc: [], }; } componentDidMount() { this.fetchData(); } fetchData() { […]