Skip to content

Call handleUnmount before rendering a new page #1020

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

Merged
merged 1 commit into from
Oct 19, 2019

Conversation

jkbailey
Copy link
Contributor

@jkbailey jkbailey commented Sep 3, 2019

Summary

UJS would mount non permanent react components multiple times when navigating away and then back to a page with one.

Other Information

This was modified back in July in this commit. It appears as if it might have been modified unintentionally.

@BookOfGreg
Copy link
Member

Going to merge this just now. Thanks for contributing. If you could throw in a test to ensure it's not toggled back accidentally in another PR I'd really appreciate it also!
Commented in linked issue why it's taking a while to go through, hope you will bear with me or can offer a hand to get this out.

@BookOfGreg BookOfGreg merged commit 94f58e2 into reactjs:master Oct 19, 2019
@jnstq
Copy link

jnstq commented Nov 20, 2019

@BookOfGreg Would be great if we could get a new release with this fix included with react_ujs v2.6.0 the callback componentWillUnmount isn't triggered.

@BookOfGreg
Copy link
Member

@jnstq Yep I'll try get a release out at the weekend. I hate releasing while the tests don't pass but I can't really help that my dependencies didn't follow semver.

@jnstq
Copy link

jnstq commented Dec 8, 2019

@BookOfGreg Just checking the status of this 😄

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.

3 participants