You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue looks like a question that would be best asked on StackOverflow.
StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.
Will close this as this is really a question that should be asked on StackOverflow.
Is this a bug report?
No
Have you read the Contributing Guidelines?
No
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 8.4.0
Yarn: 0.27.5
npm: 5.4.0
Watchman: 4.7.0
Xcode: Xcode 8.3.3 Build version 8E3004b
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
react-native: 0.48.1 => 0.48.1
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
Target Platform: iOS (10.3), android (23)
Hello! I am actually pretty new to react native and I stuck on flat list.
Actually I implemented flat list like this with react navigation (tabs).
when I enter the tab, onEndReached start automatically although I did not scroll to the bottom.
please give me some tips to solve this.
these are my codes:
flat list:
return (
{console.log(this.state.comment)}
<FlatList
data={this.state.comment}
onEndReachedThreshold={0}
onEndReached={this._onEndReached}
renderItem={({ item }) => (
<ListItem
title={ item.comment }
subtitle={'\n\n\n' + this._getDay(item)}
/>
)}
keyExtractor={item => item.id}
/>
_onEndReached function (adding information to change state):
_onEndReached = () => {
if (!this.onEndReachedCalledDuringMomentum) {
this.setState({
page: this.state.page + 1 },
() => {
store.networkManager.requestUserCommentR(this.cbComment, this.state.page);
}
);
}
}
thank you for all!
The text was updated successfully, but these errors were encountered: