'Cannot read properties of null (reading 'pulsate') in material-ui Button component
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 ?
Solution 1:[1]
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>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Hritik Sharma |
