Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

findDOMNode is deprecated in StrictMode #2389

Description

@sidneygijzen

Describe the bug
Rendering a Modal results in the following warning in the console: Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Portal 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

To Reproduce

  1. when rendering a Modal, e.g:
import { Modal, Paragraph } from '@amsterdam/asc-ui'

<Modal
  aria-labelledby="modal"
  open
>
  <div>
    <Paragraph>
      Lorem ipsum dolor sit amet, consectetur adipisicing elit.
      Architecto, quisquam!
    </Paragraph>
  </div>
</Modal>
  1. Open dev tools of the browser and see the warning displayed in the console.

Expected behavior
I would expect the Modal to render without the console warning.

Tested with:

  • React: 17.0.2
  • @amsterdam/asc-ui: 0.37.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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