openedx / openedx/paragon

Deprecated: `findDOMNode` Used in `OverlayTrigger` After React 18 Upgrade

Open
#3,425 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
140
Forks
100
Avg merge
1h 3m
Merged PRs (30d)
30

Description

Upon upgrading openedx/frontend-app-learner-portal-enterprise to React 18, new deprecation warnings related to findDOMNode are seen when running in StrictMode. See below for stack trace:

Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of RefHolder 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 Error Component Stack
    at button (<anonymous>)
    at _c (index.tsx:46:3)
    at RefHolder (OverlayTrigger.js:17:1)
    at OverlayTrigger (OverlayTrigger.js:57:1)
    at OverlayTrigger (index.tsx:41:14)
    at IconButtonWithTooltip (index.tsx:161:3)
    at div (<anonymous>)
    at _c (index.jsx:11:3)
    at div (<anonymous>)
    at div (<anonymous>)
    at div (<anonymous>)
    at _c (index.jsx:11:3)
    at div (<anonymous>)
    at div (<anonymous>)
    at BaseCourseCard (BaseCourseCard.jsx:125:3)

It appears the findDOMNode is coming from react-bootstrap's OverlayTrigger component here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing react-bootstrap's OverlayTrigger implementation at the linked source and tracing its use through the stack trace, including IconButtonWithTooltip and BaseCourseCard. Reproduce the warning under React 18 StrictMode, then verify that the selected change removes the findDOMNode deprecation without breaking the affected overlay behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.