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

deferUpdate calls forceUpdate even after unmount #19

Closed
claudiopro opened this issue May 17, 2018 · 0 comments
Closed

deferUpdate calls forceUpdate even after unmount #19

claudiopro opened this issue May 17, 2018 · 0 comments

Comments

@claudiopro
Copy link
Contributor

claudiopro commented May 17, 2018

If any of the components exported by react-lineto have a delay set, the component may schedule a call to forceUpdate after the component is unmounted:

// Forced update after delay (MS)
deferUpdate(delay) {
clearTimeout(this.t);
this.t = setTimeout(() => this.forceUpdate(), delay);
}

Fix is trivial and consists into clearing the timeout in componentWillUnmount(). I'll propose a fix shortly.

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

No branches or pull requests

1 participant