Skip to content

findDOMNode is deprecated in StrictMode < Button / > #4050

@uinstinct

Description

@uinstinct

Bug Report

I was having this problem :
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of RefFindNode which is inside StrictMode. while working with semantic-ui-react

I would have had use refForwarding. But, now the problem is I have used Button on many different components.

Steps

This thing thing can be reproduced easily in any when we are using the Button component.

// App.js

import React from "react";

import "semantic-ui-css/semantic.min.css";
import { Button } from "semantic-ui-react";

export default function App() {
  return (
    <div className="App">
      <Button>Click Me</Button>
    </div>
  );
}

Result

Button Ref Problem

Version

"semantic-ui-react": "^1.2.0"
"semantic-ui-css": "^2.4.1"

Testcase

I have added a codesandbox url to see this problem easily:

https://codesandbox.io/s/semantic-ui-react-button-issue-d6ipt?file=/src/App.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions