Semantic-Org / Semantic-UI-React

The official Semantic-UI-React integration
https://react.semantic-ui.com
MIT License
13.2k stars 4.04k forks source link

[Button] should not throw findDOMNode warning in browser #4396

Closed codewizard-dt closed 11 months ago

codewizard-dt commented 1 year ago

[Button] should not throw findDOMNode warning in browser

Steps

Expected Result

There should be no warnings

Actual Result

There is a big red warning

react-dom.development.js:86 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://reactjs.org/link/strict-mode-find-node
    at button
    at RefFindNode (http://localhost:3000/static/js/bundle.js:2245:35)
    at Ref (http://localhost:3000/static/js/bundle.js:2186:24)
    at Button (http://localhost:3000/static/js/bundle.js:66088:29)

Version

Semantic-UI-React 2.1.3 React ^18.2

welcome[bot] commented 1 year ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

yveslange commented 1 year ago

Same issue for multiple other components (Dimmer, ...)

layershifter commented 1 year ago

Please try the latest beta i.e. semantic-ui-react@3.0.0-beta.0, it does not use findDOMNode anymore.

yveslange commented 1 year ago

Using 3.0.0-beta.0 with semantic-ui-css@^2.5.0 fixed the issue. Thanks @layershifter

achimkoellner commented 11 months ago

@layershifter when will v3 be considered stable?

layershifter commented 11 months ago

@achimkoellner once issues from #4409 will be resolved.


Closing this as the problem is resolved in the latest beta.