iTwin / iTwinUI

A design system for building beautiful and well-working web interfaces.
https://itwin.github.io/iTwinUI/
MIT License
105 stars 38 forks source link

findDOMNode deprecation warning with newest react 18 version #2199

Open Xellon opened 4 weeks ago

Xellon commented 4 weeks ago

Describe the bug (current behavior)

With newest React 18 version when certain iTwinUi-react components are used and app is in strict mode, an error is logged into the console: findDOMNode is deprecated in StrictMode.

The error is coming from 'react-transition-group' package that is used in WithCSSTransition component. As I understand according to issue https://github.com/reactjs/react-transition-group/issues/904 this can be fixed on iTwinUI side.

Expected Behavior

No response

Link to minimal repro

No response

Steps To Reproduce

  1. Create an app that is using React 18 and is wrapped in strict mode.
  2. Use one of the affected components, e.g. WithCSSTransition
  3. You should be seeing the error in browser console when affected component is rendered

Anything else?

No response

mayank99 commented 4 weeks ago

@Xellon Thanks for reporting this issue. This is something we're aware of, and we're actually planning to remove the dependency on react-transition-group altogether.