react-native-image-viewer
react-native-image-viewer copied to clipboard
Cannot update during an existing state transition warning
I believe it's coming from here:
// 保存 imageSize
const saveImageSize = () => {
// 如果已经 success 了,就不做处理
if (this!.state!.imageSizes![index] && this!.state!.imageSizes![index].status !== 'loading') {
return;
}
const imageSizes = this!.state!.imageSizes!.slice();
imageSizes[index] = imageStatus;
this.setState({ imageSizes });
};