-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image Flickers when Updated from 0.42.3 to 0.43.4 and changed from listview to flatlist #13886
Comments
Are you using dataSource from |
No i am using a json array and data is properly visible as before.. just the issue is images keeps on flickering.. I am not getting why it behaving like this @Stoffern |
@bgoyal2222 sounds like you have issues with the FlatList rerendering on scroll / what does this function do? onEndReached={()=>{
if(this.state._stopLazyLoad == false){
return this.fetchNewsFeed()
}
}} |
@Stoffern that is for when the user reach to the end of my feed.. to make a call and fetch further data and display |
Is that an async call or are you slowing stuff down with it? |
ya thats a fetch api call @dobrienlzd |
A few ideas: Where is the _render_row(item) function? Seems like that would be interesting to see!
Also what version of React are you using? Just pick whichever is easiest first. But FlatList get's lots of attention. Last commit just four hours ago so give us some stats! |
Thanks for the help.. I am not sure but it seems to be solved when i removed image prop resizeMode='contain' |
Updated RN from 0.42.3 to 0.43.4 and changed newsfeed component from listview to flatlist
So, whenever we scroll the feed the image flickers
<FlatList
ref={(c)=>this._listViewRef = c}
onViewableItemsChanged={(visibleRows, changedRows) => console.log("yes it works")}
refreshing={this.state._refreshing}
data={this.state._dataSource}
renderItem={({item})=>this._renderRow(item)}
enableEmptySections={true}
onEndReached={()=>{
if(this.state._stopLazyLoad == false){
return this.fetchNewsFeed()
}
}}
extraData={this.state}
onEndReachedThreshold={height*4}
ListHeaderComponent={()=>}
ListFooterComponent={()=>{
if(this.state._refreshing == true){
return null;
}
return <View style={{flex:1,justifyContent:'center',alignItems:'center'}}>
}}
/>
The text was updated successfully, but these errors were encountered: