Skip to content

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

@codewizard-dt

Description

@codewizard-dt

[Button] should not throw findDOMNode warning in browser

Steps

  • Be using React ^18 in StrictMode
  • Add Button component to a page
  • Open Dev Tools and look at console

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

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