componentWillReceiveProps should not re-blur image unless props changed
mull opened this issue · 2 comments
mull commented
Hi javierbyte,
componentWillReceiveProps(nextProps) {
stackBlurImage(this.img, this.canvas, nextProps.blurRadius, this.width, this.height);
},
This is quite a waste, as you don't check if the props actually change. Perhaps this should be done in componentWillUpdate
- or just check if the props changed?
javierbyte commented
You are right!
I will fix this tonight.
Thank you!
javierbyte commented
Done!