Skip to content

findDOMNode is deprecated in StrictMode #378

@Alan-Gomes

Description

@Alan-Gomes

I am getting this error using CTooltip with @coreui/react 4.10.0 and react 18.2.0

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition2 which is inside StrictMode. 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

After some investigation, it looks like the issue comes from this specific part of the implementation. The CTooltip component is not passing the nodeRef prop as required by the Transition element to not use findDOMNode.

Although I found the cause of the error, I don't have enough knowledge about the project's architecture to open a pull request. Thanks for the support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions