Skip to content
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

findDOMNode deprecation warning with newest react 18 version #2199

Open
Xellon opened this issue Aug 21, 2024 · 6 comments · May be fixed by #2391
Open

findDOMNode deprecation warning with newest react 18 version #2199

Xellon opened this issue Aug 21, 2024 · 6 comments · May be fixed by #2391
Labels
bug Something isn't working

Comments

@Xellon
Copy link

Xellon commented Aug 21, 2024

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 reactjs/react-transition-group#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

@Xellon Xellon added the bug Something isn't working label Aug 21, 2024
@mayank99
Copy link
Contributor

@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.

@MartynasStrazdas
Copy link

Any news on this issue?

@mayank99
Copy link
Contributor

mayank99 commented Dec 9, 2024

There isn't much news, except that it is still planned. Now that React 19 has been released, we have prioritized this and other tasks related to supporting React 19.

@Antanas-Bentley
Copy link
Contributor

Antanas-Bentley commented Dec 27, 2024

Hi all, with React19 being out already, we are blocked on upgrading due to reliance on findDOMNode from <Dialog /> component. Any updates on this? @mayank99

Crash callstack in React19 based app:
Image

@mayank99
Copy link
Contributor

@Antanas-Bentley We are actively working on it; I think we are going to drop the dependency on react-transition-group and replace them with no transitions for now. Out of curiosity, are all your other dependencies ready for React 19?

@Antanas-Bentley
Copy link
Contributor

Antanas-Bentley commented Dec 30, 2024

@mayank99 Hey, thanks for the quick reply. For me the situation is a bit lighter as I'm developing a dashboard with CRUD. There are not many deps at all besides the design system and tanstack-query (they do support 19). I thought I'd seize the opportunity to try out react19 without much effort due to the codebase being minimal. This is not a pressing issue for me now just wanted to reach out with the error I saw, thanks!

@r100-stack r100-stack linked a pull request Jan 10, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants