react-native-fast-image icon indicating copy to clipboard operation
react-native-fast-image copied to clipboard

Why the onLoadStart is triggered twice?

Open ntk0104 opened this issue 4 years ago • 1 comments

Hi guys, Can anyone explain me why the onLoadStart method run twice. I have the simple example for it and this is the snippet:

onLoadedCompletely = () => {
    console.log("compledted ", this.props.item)
    this.setState({ isLoaded: true })
  }

  render() {
    const {id} = this.props.item
    console.log("Redering with key: ", id)
    return (
      <View>
        <FastImage
          source={this.props.source}
          style={this.props.style}
          resizeMode={this.props.resizeMode}
          onLoadStart={() => console.log("start - ", id)}
          onLoadEnd={this.onLoadedCompletely}
        />
      </View>

    )
  }

And this is the log i got from it

Redering with key: 133 start - 133 start - 133 compledted

ntk0104 avatar Jul 28 '19 07:07 ntk0104

@ntk0104 I'm having the same problem, did you ever figured why onLoad kept running twice?

rheng001 avatar Apr 15 '22 21:04 rheng001