FortAwesome / react-fontawesome

Font Awesome React component
https://fontawesome.com
MIT License
3.67k stars 262 forks source link

Warning: findDOMNode is deprecated and will be removed in the next major release #565

Closed markwoon closed 1 week ago

markwoon commented 2 months ago

Describe the bug I'm seeing this warning in the console:

instrument.js:109 Warning: findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node
    at Transition (xxx/vendors-node_modules_fortawesome_free-brands-svg-…cebookF_js-node_modules_fortawesom-b99882.c990c72….js:96547:30)
    at CSSTransition (xxx/vendors-node_modules_fortawesome_free-brands-svg-…cebookF_js-node_modules_fortawesom-b99882.c990c72….js:96096:35)
    at div
    at TransitionGroup (xxx/vendors-node_modules_fortawesome_free-brands-svg-…cebookF_js-node_modules_fortawesom-b99882.c990c72….js:97126:30)

Getting the above error when running React 18.3.1 in dev mode.
Using fontawesome 6.5.2.

I don't think this is new. This used to be a warning when running React in strict mode. Would be nice to have this handled before React 19 is released.

robmadole commented 2 months ago

@markwoon can you help me find this? I can't locate the usage of that function anywhere in the 2.x branch of this repo.

Arkellys commented 2 weeks ago

This is an error from react-transition-group, which this repo doesn't use. I'm not sure why the stack mentions FA at all.