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 is deprecated in StrictMode #3810

Closed
gshilin opened this issue Oct 15, 2019 · 2 comments
Closed

findDOMNode is deprecated in StrictMode #3810

gshilin opened this issue Oct 15, 2019 · 2 comments
Labels

Comments

@gshilin
Copy link

gshilin commented Oct 15, 2019

Bug Report

Steps

import React, { StrictMode } from 'react'
import { Button } from 'semantic-ui-react'

const ButtonExampleButton = () => 
  <StrictMode>
    <Button as="a" href="https://google.com">
      Click Here
    </Button>
  </StrictMode>

export default ButtonExampleButton

Expected Result

No warnings

Actual Result

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 a (created by Button)
in RefFindNode (created by Ref)
in Ref (created by Button)
in Button (at example.js:6)
in StrictMode (at example.js:5)
in ButtonExampleButton

Version

0.88.0

Testcase

https://codesandbox.io/s/semantic-ui-react-1qmyh

@punmechanic
Copy link

punmechanic commented Oct 24, 2019

See #2732 (comment) - This is unfixable without reactjs/rfcs#97 being merged

@gshilin
Copy link
Author

gshilin commented Oct 25, 2019

10x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants