-
Notifications
You must be signed in to change notification settings - Fork 2.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
ListItem button onPress slow performance #662
Comments
Interesting => this issue go away if I use ListView from React instead of List from NativeBase NativeBase is using ListView internally in List , but I wonder how is it detecting change in row? I have to update state more then once when user is scrolling down. So I do new fetch request in "onEndReached" and update state with fetched data like this:
Therefore whole array of objects will not be same as old array in state , if you compare objects with "==" |
Ok I found out why this is happening. |
Can you elaborate by what you mean wrap in ? Does that mean one should remove the container altogether? |
Do not use List inside Content |
So, one of the reasons to use native base is the nice setup of where content scrolls and header and footer are pinned to the top and bottom, respectively.. When I remove from wrapping a list that breaks that layout. How should one address that pattern using a list, without using the wrapper? |
@srhise did you solve this without using .. ? I'm facing a similar situation and would like to get some feedback on possible solutions before I open another issue. |
@cyclops24 Solution provided in above comment dd'nt work? |
@SupriyaKalghatgi I also find this: facebook/react-native#11809 |
@mnlbox Check http://docs.nativebase.io/docs/Compatibility.html |
Wait, is it list inside content or content inside list?? Can you explain why that is not recommended, ie. what is the impact? |
@srhise I think you right. /CC: @shivrajkumar |
Guys I have same issue. Please help me to fix this issue. 😢 /CC: @SupriyaKalghatgi , @obykoo |
NativeBase List will be deprecated, very soon this will be documented |
@SupriyaKalghatgi Any update on NativeBase List? Will it be replaced by something else or should we stick to FlatList? Thanks! |
getting same problem, using React Native 0.52, and develop for Android. |
@grzjos Go on with FlatList |
@SupriyaKalghatgi Didn't help performance for me. It's like the TouchableOpacity blocks screen rendering. |
update: I think the problem is no idea why a third party lib have better performance then FlatList, but it work for me. btw, I open a issue on official React Native: facebook/react-native#17801 |
@Laurensdc Are you using FlatList or NativeBase |
@SupriyaKalghatgi I used both and had the same problems. I did keep the component from NativeBase in both scenarios, but I tried wrapping it in FlatList as suggested. This did not help performance unfortunately. What was interesting is that the actual dispatch of the onPress() comes late. It's like the screen goes into 'pressed' state for a whole second, and only then starts to dispatch the function. The Redux actions for example are only dispatched after that second of delay. |
I am having performance issue with List and onPress. onPress is delayed too much. I do not know if there is problem on iOS , but there is on Android.
The text was updated successfully, but these errors were encountered: