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

Memory Leak due to Backspace after unmounting #86

Open
jrios6 opened this issue May 4, 2020 · 4 comments
Open

Memory Leak due to Backspace after unmounting #86

jrios6 opened this issue May 4, 2020 · 4 comments

Comments

@jrios6
Copy link

jrios6 commented May 4, 2020

I am receiving the following memory leak warning after unmounting a parent container that uses Typist and Typist.Backspace. I presume that this is due to Typist.Backspace's async function still running even after unmount.

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.

@georgeportillo
Copy link

georgeportillo commented May 20, 2020

Same here

@khaaleoo
Copy link

the same question

@navonf
Copy link

navonf commented Aug 14, 2020

I am also receiving this error

@vorobiovart
Copy link

vorobiovart commented Nov 13, 2020

I think the temp solution for this situation would be not to set delay on Typist.Backspace, but instead use Typist.Delay before, like this:

working without memory leaks:

  <Typist.Delay ms={1100} />
  <Typist.Backspace count={name.length} />

working with leaks:

<Typist.Backspace count={name.length}  delay={1100} />

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

5 participants