react-images-upload
react-images-upload copied to clipboard
Early return in componentWillReceiveProps if singleImage is true
The case: let say we are editing a post content. We want to show a default image from a url received from database, and we want to change image preview if user choose an image (change the image).
The current implementation, componentWillreceiveProps will always invoked when onChange is fired because defaultImages is a primitive (array). This makes image preview won't change.
With singleImage props being true, we want to preview the selected image, not the default one, if user is going to change image.
Thank you
@JakeHartnell What do you think about this?