How to use the react-move.createNodeGroup function in react-move

To help you get started, we’ve selected a few react-move 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-tools / react-move / docs / src / components / NodeGroup.js View on Github external
import { createNodeGroup } from 'react-move'
import { interpolate, interpolateTransformSvg } from 'd3-interpolate'

export default createNodeGroup(function getInterpolator(begValue, endValue, attr) {
  if (attr === 'transform') {
    return interpolateTransformSvg(begValue, endValue)
  }

  return interpolate(begValue, endValue)
}, 'DocsNodeGroup')

react-move

Beautiful, data-driven animations for React.

MIT
Latest version published 3 years ago

Package Health Score

62 / 100
Full package analysis