I was making some react components and make styles.js for each of the following. i am learning from a YT tutorial who is using material-ui version4. so i upgraded it to V5.
Code for the component (Form) =
import React from 'react'
import useStyles from './styles';
const Form = () =>{
const classes = useStyles();
return(
<h1>
FORM
</h1>
);
}
export default Form;
code for the styles.js
import { makeStyles } from '@mui/styles';
export default makeStyles((theme) => ({
root: {
'& .MuiTextField-root': {
margin: theme.spacing(1),
},
},
paper: {
padding: theme.spacing(2),
},
form: {
display: 'flex',
flexWrap: 'wrap',
justifyContent: 'center',
},
fileInput: {
width: '97%',
margin: '10px 0',
},
buttonSubmit: {
marginBottom: 10,
},
}));
The error i recieved
enter image description here
Is there any simple fix for this.