I am just started to learn reactjs using material-ui but getting this error when apply style to my component. My code:
const useStyles = makeStyles(theme => (
material-ui makeStyles
function only works inside function components, as it uses the new React Hooks APIs inside.
You have two options:
I personally recommend the first approach, as this is becoming the new standard in React development. This tutorial may help you get started with functional components and check the docs for React Hooks