Closed
Description
Describe the bug
On React 19 (beta), an error is thrown if className
is not passed to <FontAwesomeIcon>
.
I believe it's the same bug as the one reported on this issue, except that now it happens even when no className
is specified.
Reproducible test case
https://codesandbox.io/p/sandbox/react-19-font-awesome-k6n8ww?file=%2Fsrc%2FApp.js%3A11%2C51
Error on the sandbox:
TypeError: className is undefined
I get a different error when I try it on my app (maybe it depends on the bundler config):
Uncaught TypeError: Cannot read properties of undefined (reading 'split')
Expected behavior
The error is fixed when adding a className
, but this prop should not be required.
Setup
- Browsers: Firefox (125.0.3), Electron (Chromium M124)
- Font Awesome
6.5.2
- react-fontawesome
0.2.0
- React
19.0.0-beta-6946ebe620-20240508
Metadata
Assignees
Labels
No labels