Skip to content

CSSTransition using findDOMNode which is deprecated in React 16.13.1 #668

@david-forster10

Description

@david-forster10

A warning regarding the deprecation of findDOMNode is shown when using the SwitchTransition & CSSTransition in Strict mode (React v16.13.1).

What is the current behaviour?

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

What is the expected behavior?

No console messages

Could you provide a CodeSandbox demo reproducing the bug?

Can be recreated using the demo sandbox and changing the React version to 16.13.1.
Screenshot (7)

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