How to use the react-native-svg/lib/extract/extractProps function in react-native-svg

To help you get started, we’ve selected a few react-native-svg 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 capitalone / react-native-pathjs-charts / src / Pie.js View on Github external
const sliceRef = this._animationRefArray[`SLICE${index}`]
        if (sliceRef === undefined) return
        if (sliceRef._finished) return;

        const animValue = this._animationArray[index].interpolate({
            inputRange: [0, 1],
            outputRange: [0, 1],
            extrapolate: 'clamp'
        })

        const props = {
          fill: fill,
          fillOpacity: animValue.__getValue()
        }

        const nativeProps = extractProps(props, sliceRef)
        sliceRef.setNativeProps(nativeProps)
        if (props.fillOpacity === 1) sliceRef._finished = true
      });
  }