ascoders/react-native-image-viewer

Cannot update during an existing state transition warning

Aryk opened this issue · 0 comments

Aryk commented

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 });
    };

B93CCCEE-1E4B-44EC-8E56-4E9B46524C10