Skip to content

Timeout conflict when changing some props #21

@halmos

Description

@halmos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions