I'm using NextJS with Typescript and when i'm import FontAweSomeIcon to use like this
<FontAwesomeIcon icon={faCheck as any} />
it got this warning from console "Warning: FontAwesomeIcon: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead."
Can you guys help me to how to remove or fix that warning
I was having the same problem. But, after updating each Font Awesome dependency, the error message was gone.
Execute the following in your terminal inside your project directory:
npm i @fortawesome/react-fontawesome@latest @fortawesome/fontawesome-svg-core@latest @fortawesome/free-regular-svg-icons@latest
Warning: this will install the latest version to each of these packages, so be cafeful because may break things.
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