Is this a bug report?
Yes
Yes
Environment
Environment:
OS: macOS High Sierra 10.13.1
Node: 6.11.4
Yarn: 1.1.0
npm: 5.3.0
Watchman: Not Found
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.51.0 => 0.51.0
Steps to Reproduce
- Please refer to snack
- Repo has also been uploaded at github
- Any state change produces an error when using
onViewableItemsChanged
- What does this error even mean?
Note: Placing the onViewableItemsChanged function in a const outside the render method also does not assist...
<FlatList
data={this.state.cardData}
horizontal={true}
pagingEnabled={true}
showsHorizontalScrollIndicator={false}
onViewableItemsChanged={(info) =>console.log(info)}
viewabilityConfig={{viewAreaCoveragePercentThreshold: 50}}
renderItem={({item}) =>
<View style={{width: width, borderColor: 'white', borderWidth: 20,}}>
<Text>Dogs and Cats</Text>
</View>
}
/>
Expected Behavior
I'm not sure why this is happening. I would like to know if this is a bug with the current release, of if I'm doing something wrong.
Should users be using a separate workaround (ie. using onScroll rather than onViewableItemsChanged for information on scroll Position?
What does this error even mean?
Actual Behavior
Error

Reproducible Demo
Please refer to snack
Repo has also been uploaded at github
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS High Sierra 10.13.1
Node: 6.11.4
Yarn: 1.1.0
npm: 5.3.0
Watchman: Not Found
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.51.0 => 0.51.0
Steps to Reproduce
onViewableItemsChangedNote: Placing the
onViewableItemsChangedfunction in aconstoutside the render method also does not assist...Expected Behavior
I'm not sure why this is happening. I would like to know if this is a bug with the current release, of if I'm doing something wrong.
Should users be using a separate workaround (ie. using
onScrollrather thanonViewableItemsChangedfor information on scroll Position?What does this error even mean?
Actual Behavior
Error

Reproducible Demo
Please refer to snack
Repo has also been uploaded at github