Created
March 5, 2020 13:33
-
-
Save sueLan/c6b01e11eedd998cfc48c9a44720fc52 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (this.props.viewabilityConfigCallbackPairs) { | |
this._viewabilityTuples = this.props.viewabilityConfigCallbackPairs.map( | |
pair => ({ | |
viewabilityHelper: new ViewabilityHelper(pair.viewabilityConfig), | |
onViewableItemsChanged: pair.onViewableItemsChanged, | |
}), | |
); | |
} else if (this.props.onViewableItemsChanged) { | |
this._viewabilityTuples.push({ | |
viewabilityHelper: new ViewabilityHelper(this.props.viewabilityConfig), | |
onViewableItemsChanged: this.props.onViewableItemsChanged, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment