react-native-svg-animations
react-native-svg-animations copied to clipboard
Please fix depreciation changes
In the file https://github.com/73R3WY/react-native-svg-animations/blob/master/utils/AnimatedSVGBrush/index.js you have componentWillReceiveProps. Could you please change the method or the logic to a relevant.
Hi, I have found some update for the depreciation changes,
https://github.com/73R3WY/react-native-svg-animations/blob/master/utils/AnimatedSVGBrush/index.js
In above file you can please replace the method and code
componentWillReceiveProps(nextProps) { this.updateCache(nextProps); if (nextProps.strokeDasharray !== this.props.strokeDasharray) { removeListeners(this.strokeDasharray); this.strokeDasharray = listen(nextProps.strokeDasharray, _ => this.setNativeProps({ updateStrokeDasharray: true }) ); } }
to
componentDidUpdate(prevProps) { this.updateCache(prevProps); if (this.props.strokeDasharray !== prevProps.strokeDasharray) { removeListeners(this.strokeDasharray); this.strokeDasharray = listen(prevProps.strokeDasharray, _ => this.setNativeProps({ updateStrokeDasharray: true }) ); } }
Its working fine for me. Thanks
Already published @govarthananve . Thank you.
#48