New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning: findDOMNode is deprecated in StrictMode. #5075
Comments
react-bootstrap/src/Overlay.js Lines 114 to 121 in d983ec8
react-bootstrap/src/OverlayTrigger.js Lines 121 to 124 in d983ec8
seems like at these two places, hmmm. We already had this issue come up a few month ago if I remember correctly. |
Yes, many thanks. I found some references earlier but all were closed and I couldn't see any clear instructions on work-arounds or when it might be fixed. I think it applies to some other components too. |
arg, we should have removed this probably, like we did for dropdowns. What we can do tho is only call findDOMNode if required. that way users can avoid it themselves by not using class component refs |
Thanks. Happy to test any updated version. |
Just faced the same issue on a clean CRA app with react-bootstrap@1.0.0 |
PR's welcome if folks wanna get it fixed quicker, we will get to it but it's lower on the priority list since it's an opt in warning |
I encountered this warning as well when using the navbar collapse. Here's the stacktrace:
Haven't found the reference in code just yet. |
Modal also has this issue too.
|
Just got the issue with
|
Tab.Pane also has the same issue |
I have quickly checked the repository to find all
I unfortunately don't have the required knowledge of the library to make the changes myself and create a pull request. I hope that somebody will be able to fix it. |
I'm in the process of fixing this upstream with: https://github.com/react-bootstrap/react-overlays/pull/794/files#diff-97a43659c6311e819ce665f4a3291f58 which we can use here as well once it's merged and upgraded |
Some of the issues came from a dependency, react-transition-group. It has to be fixed from this side. Here's the offending code: https://github.com/reactjs/react-transition-group/blob/master/src/Transition.js If you don't need the transition, as a temporary fix, you can set
|
It looks like they already know about the issue in this particular library as well : #429 |
Had this issue using <Modal ../>
"bootstrap": "^4.4.1", |
Thanks @jquense ! Upgrading to the fresh 1.0.1 version fixed it for Modals, although it only works if animated is set to false. |
Yes we are waiting for react transition group to update as well |
v.1.0.1: "Warning: findDOMNode is deprecated" still actual for Modal |
Also facing this issue. |
Modal with animation set to false. index.js:1 Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Modal which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node |
Having the same issue with material-ui dialog |
I must be doing something different, because creating the modal with animation={false} doesn't raise the warning for me, and I got it if I set it to true.
|
I had the same messages before when I used The following is the solution for fixing the issue:
|
I have the error with Accordion when I toggle a Accordion.Collapse element. Any hints on how to fix this problem for Accordion until react-transition fixes it? using react-bootstrap@1.0.1 |
So sad, my eyes don't like it ```
|
Folks please stop posting the same example of react-transition-group causing an error, its not helpful to the discussion. We know why these occur, If someone wants to upgrade RTG to the latest and migrate to the |
Fixed in v2 alpha |
Error generated when using
Warning: findDOMNode is deprecated in StrictMode.
Tested with latest 1.0.0 release of recat-bootstrap
From what I can see this is a known issue with react-bootstrap but I am not clear on when it will be fixed or any workarounds in the meantime. Console errors are not helpful when developing. Turning off strict mode compromises other development.
see: https://reactjs.org/docs/strict-mode.html
The text was updated successfully, but these errors were encountered: