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

Timeout conflict when changing some props #21

Open
halmos opened this issue Aug 26, 2016 · 1 comment
Open

Timeout conflict when changing some props #21

halmos opened this issue Aug 26, 2016 · 1 comment

Comments

@halmos
Copy link

halmos commented Aug 26, 2016

Version

0.4.1

Steps to reproduce

  1. set typing prop to 1
  2. set interval to toggle typing prop between 1 and -1

Expected behavior

What should happen
the direction of typing / deleting should alternate

Actual behavior

What is happening
the setInterval function inside of typewriter are not being cleared and are racing/conflicting, causing erratic behavior
I was able to resolve by adding clearTimeout(this._timeoutId) inside of typewriter's componentWillRecieveProps.

@halmos halmos changed the title Timeout's conflict when changing some props Timeout conflict when changing some props Aug 28, 2016
@rg1220
Copy link

rg1220 commented Sep 5, 2016

+1
I too ran into this issue.

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

2 participants