Skip to content

fix: add nodeRef to CSSTransition for React 19 compatibility#9

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
fix/transition-group-noderef
Open

fix: add nodeRef to CSSTransition for React 19 compatibility#9
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
fix/transition-group-noderef

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot commented May 4, 2026

Summary

Add nodeRef props to all CSSTransition components to prepare for React 19 compatibility. In React 19, react-transition-group requires explicit nodeRef usage instead of relying on findDOMNode, which has been removed.

Changes:

  • Upgrade react-transition-group from ^4.4.2 to ^4.4.5
  • Alert.jsx: Import useRef, create nodeRef, pass it to CSSTransition and attach to the <span> child
  • Modal.jsx: Add a separate transitionRef (distinct from the existing click-outside ref), pass it to CSSTransition and attach to the <div className={styles.modalContainer}> child

Review & Testing Checklist for Human

  • Verify alert toast animations still appear/disappear correctly when guessing words
  • Verify modal open/close fade transitions work (e.g. stats modal, settings modal, help modal)
  • Confirm click-outside-to-close still works on modals (the existing ref for useOnClickOutside is preserved separately)

Notes

This is Session B of a 4-session parallel migration to React 19. Only Alert.jsx, Modal.jsx, and package.json were modified.

Link to Devin session: https://app.devin.ai/sessions/6eaaa16c52e8448194ccaf82d3c0614a
Requested by: @shahmir-masood


Devin Review

Status Commit
⚪ Not started

Run Devin Review

💡 Connect your GitHub account to enable automatic code reviews.

Open in Devin Review (Staging)

- Upgrade react-transition-group to ^4.4.5
- Add nodeRef to CSSTransition in Alert.jsx
- Add transitionRef to CSSTransition in Modal.jsx

Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants