Skip to content

Bug - Hooks: 'OnMount' effect is not disposed when hierarchy is removed #40

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

Conversation

bryphe
Copy link
Contributor

@bryphe bryphe commented Jul 30, 2019

Fixes #41

This adds a test case reproducing the issue - when a parent-of-a-parent is removed, the child OnMount effects are not disposed properly.

This impacted Revery's animations (if you remove an animating element, it uses the OnMount hook disposal to un-register the animation) - it would keep animations alive when transitioning between elements.

Related to #8

@wokalski
Copy link
Member

looking 🕵

@tcoopman
Copy link

tcoopman commented Sep 6, 2019

Is this correctly closed?

@wokalski
Copy link
Member

wokalski commented Sep 6, 2019

I don't think so @tcoopman

@wokalski wokalski reopened this Sep 6, 2019
@wokalski
Copy link
Member

The test does verify if the unmount effect is called once so I believe it covers #41.

@wokalski wokalski changed the title [REPRO] Bug - Hooks: 'OnMount' effect is not disposed when hierarchy is removed Bug - Hooks: 'OnMount' effect is not disposed when hierarchy is removed Sep 27, 2019
@wokalski wokalski merged commit 781fe66 into briskml:master Sep 27, 2019
wokalski added a commit that referenced this pull request Oct 27, 2019
('OnMount' effect is not disposed when hierarchy is removed)
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.

Effects are potentially called twice
3 participants