Here is my simple React code for a single component but it keep throwing the same warning every-time I checked. Even when copy and past the example still same warning and the icon is nowhere to be seen. Please help!
Link
import React, { Component } from 'react';
import { Button } from '@material-ui/core';
import AddIcon from '@material-ui/icons/Add';
class AddWorkButton extends Component {
constructor(props) {
super(props);
this.state = { }
}
render() {
return (
<React.Fragment>
<Button
variant="contained"
color="secondary"
startIcon={<AddIcon/>}
>
TEST
</Button>
</React.Fragment>
);
}
}
export default AddWorkButton;
I got the same error.
The problem on my side was that react-script start
was already running when I updated the Material-UI package to 4.5.
After I have restarted the react-script start
everything just started to work.
<Button variant="contained" color="primary" >
Send <ArrowForwardIcon /> </Button>
Not sure which way is the correct but I got it working this way,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With