How to use the @react-spring/core.Controller function in @react-spring/core

To help you get started, we’ve selected a few @react-spring/core 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 / addons / src / parallax.tsx View on Github external
() => ({
        config,
        busy: false,
        space: 0,
        current: 0,
        offset: 0,
        controller: new Controller({ scroll: 0 }),
        layers: new Set(),
        update: () => update(),
        scrollTo: offset => scrollTo(offset),
        stop: () => state.controller.stop(),
      }),
      []

@react-spring/core

The platform-agnostic core of `react-spring`

MIT
Latest version published 2 months ago

Package Health Score

94 / 100
Full package analysis