Type 'IconDefinition' is not assignable to type 'IconProp'
See original GitHub issueThis seems to be a duplicate of #462, but I’ve just updated everything in my project to v6
Versions “@fortawesome/free-brands-svg-icons”: “^6.0.0”, “@fortawesome/free-regular-svg-icons”: “^6.0.0”, “@fortawesome/pro-duotone-svg-icons”: “^6.0.0”, “@fortawesome/pro-light-svg-icons”: “^6.0.0”, “@fortawesome/pro-solid-svg-icons”: “^6.0.0”, “@fortawesome/react-fontawesome”: “^0.1.17”,
The following example given me the error. Is this just a case of the @fortawesome/react-fontawesome package, totally understandably, lagging a few hours behind the 6.0 release of everything else?
import { faSave } from "@fortawesome/pro-light-svg-icons"
function Component() {
<FontAwesomeIcon icon={faSave} />
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Type 'IconDefinition' is not assignable to type 'IconProp' with ...
I'm using typescript and next.js react project. I was trying to import github icon( faGithub ) in fontawesome.
Read more >Argument of type 'IconDefinition' is not assignable to ...
On build (npm start) it produces error/warning Argument of type 'IconDefinition' is not assignable to parameter of type 'IconDefinitionOrPack'.
Read more >(typescript) facing problem trying to pass font-awsome icon as ...
Error : Type 'object' is not assignable to type 'IconProp'. Type 'object' is not assignable to type '[IconPrefix, IconName]'.ts(2322) ...
Read more >Type 'IconDefinition' is not assignable to type 'IconProp' with ...
I'm using typescript and next.js react project. I was trying to import github icon( faGithub ) in fontawesome.
Read more >Methods | Font Awesome Docs
iconDefinitions ). Pre-registering icon definitions so that do not have to explicitly pass them to render an icon. Explicitly passing the icon.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I needed to replace all my versions with “latest” to please typescript:
Can you all try upgrading to 6.1.1? I think we’ve got this fixed.