Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmount React Components That Get Removed From the DOM #139

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

NathanSadler
Copy link

@NathanSadler NathanSadler commented Feb 10, 2025

Why?

When a component is mounted using the react_controller and the DOM element it is attached to gets removed, the component doesn't actually get unmounted

What Changed

  • Add a dismount method to react controller that unmounts react components

Pre-merge checklist

  • Update relevant READMEs
  • Update version number in lib/rolemodel_rails/version.rb

Copy link
Member

@Jeremy-Walton Jeremy-Walton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this method is being deprecated https://18.react.dev/reference/react-dom/unmountComponentAtNode

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

Successfully merging this pull request may close these issues.

2 participants