Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Dropdown gives me a "findDOMNode is deprecated in StrictMode" warning #4103

Closed
sparrowV opened this issue Nov 7, 2020 · 1 comment
Closed

Comments

@sparrowV
Copy link

sparrowV commented Nov 7, 2020

Bug Report

I have the following code in one of my components.
<Dropdown item text={userName}> </Dropdown>

just empty dropdown with no options. It gives me the following warning:

index.js:1 Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of RefFindNode 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
    in div (created by Dropdown)
    in RefFindNode (created by Ref)
    in Ref (created by Dropdown)
    in Dropdown (at UserAvatar.js:18)
    in span (at UserAvatar.js:17)
    in UserAvatar (at Header.js:11)
    in div (created by Header)
    in Header (at Header.js:10)
    in div (created by Segment)
    in Segment (at Header.js:9)
    in Header (at Home.js:22)
    in div (at Home.js:21)
    in Home (created by Context.Consumer)
    in Route (at App.js:19)
    in div (at App.js:17)
    in Router (created by BrowserRouter)
    in BrowserRouter (at App.js:16)
    in PersistGate (at App.js:15)
    in Provider (at App.js:14)
    in App (at src/index.js:9)
    in StrictMode (at src/index.js:8)

How can it be fixed?

Steps

Just use Dropdown in on the the components

Expected Result

no warnings

Actual Result

warning that I mentioned above

Version

latest

@sparrowV sparrowV changed the title Dropdown goves me a "findDOMNode is deprecated in StrictMode" warning Dropdown gives me a "findDOMNode is deprecated in StrictMode" warning Nov 7, 2020
@layershifter
Copy link
Member

Duplicate of #3819.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants