Warning: findDOMNode is deprecated in StrictMode when using react-bootstrap Navbar Warning: findDOMNode is deprecated in StrictMode when using react-bootstrap Navbar typescript typescript

Warning: findDOMNode is deprecated in StrictMode when using react-bootstrap Navbar


Apparently it's a github issue already. here

Since this is a warning (and not an error) therefore, your app will continue to work just fine.Facebook will eventually deprecate findDOMNode as it blocks certain improvements in React in the future

react-bootstrap will eventually upgrade it's code to drop using findDomNodes for other suitable alternatives.


Best solution for me was to set animation to false as suggested above however, you need to do it with animation="false" NOT animation={false} or you will get another warning. You will also need to add it to the Navbar.Collapse tag so:

<Navbar animation="false" ...>  ...  <Navbar.Collapse animation="false" ...>


findDomNode error usually is caused by older component packagesfor example react-bootstrap is fixing stuff, but already closed the thread because of complaints:

https://github.com/react-bootstrap/react-bootstrap/issues/5075

temporary solution they provide is to set strictmode to false in your app

if it's problem in your own code, try reading this:

https://medium.com/trabe/getting-rid-of-finddomnode-method-in-your-react-application-a0d7093b2660

as for navbar collapse do collapseOnSelect:

<Navbar collapseOnSelect bg="light" expand="lg">