How to use the @react-spring/shared.createInterpolator function in @react-spring/shared

To help you get started, we’ve selected a few @react-spring/shared examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github react-spring / react-spring / packages / animated / src / AnimatedString.ts View on Github external
reset(isActive?: boolean, goal?: string) {
    if (goal) {
      this._toString = createInterpolator({
        output: [this.getValue(), goal],
      })
    }
    this._value = 0
    super.reset(isActive)
  }
}
github react-spring / react-spring / packages / animated / src / AnimatedString.ts View on Github external
constructor(from: string, to: string) {
    super(0)
    this._toString = createInterpolator({ output: [from, to] })
  }

@react-spring/shared

Globals and shared modules

MIT
Latest version published 5 days ago

Package Health Score

94 / 100
Full package analysis