react-native-svg-animations icon indicating copy to clipboard operation
react-native-svg-animations copied to clipboard

Please fix depreciation changes

Open nstr opened this issue 4 years ago • 2 comments

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.

nstr avatar Feb 23 '20 16:02 nstr

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

govarthananve avatar Jul 13 '20 17:07 govarthananve

Already published @govarthananve . Thank you.

73R3WY avatar Jul 19 '20 05:07 73R3WY

#48

73R3WY avatar Jan 22 '24 14:01 73R3WY