Skip to content

Infinite loop if value prop is set to 0 #22

@noah79

Description

@noah79

Offending code:

  updateValue = (anima) => {
    this.props.update(anima)
    const {animatedValue} = this.target
    this.setState({animatedValue})
  }

Should be:

  updateValue = (anima) => {
    this.props.update(anima)
    const {animatedValue} = this.target
    if (animatedValue !== this.state.animatedValue) {
      this.setState({animatedValue})
    }
  }

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