This is version of material-ui that I am using :
"@mui/icons-material": "^5.5.1", "@mui/material": "^5.5.1",
This is how I imported Button component :
import Button from "@mui/material/Button";
This is how I am using Button :
<Button variant="contained" className={styles.contactBtn} autoFocus onClick={handleClose} > Close </Button>
I am getting an error like this : Cannot read properties of null (reading ‘pulsate’)
I found this thread(solution) from github Link , but it did not solved my issue . How do I fix this ?
Advertisement
Answer
I tried removing each prop in button and checked whether it is working or not.
I found, button works without autoFocus prop.
<Button variant="contained" className={styles.contactBtn} onClick={handleClose} > Close </Button>