Replies: 1 comment 1 reply
-
Have you looked into the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all, thanks a lot for this library!
I am using it to display (fairly large) photo albums and it solved a lot of issues I had with
<SectionList>
, and even simplified the code!I am hitting an issue with large albums (multiple hundred of rows in an album) and
scrollToIndex
, where the scroll misses the wanted index (sometimes it scrolls only half of the needed offset). If I issue the scroll again a few times it ends up being correct. It happens mostly with{ animated: true }
, but with very large albums I start to see the scroll being off by a few dozen pixels. A few users are even reporting crashes on low-specced devices (withanimated: true
).If you want to get a better idea of what an album is, you can see a sample album here on the web (non RN-based) version, and the app uses a similar layout.
The items are of multiple types: chapter header, chapter footer, row of elements. They are very heavy with media and do not all have the same height (this can vary a lot between header/footers and rows of media).
I see 2 possible issues here:
estimatedItemSize
not very relevant (I set it to 50, which is the smaller item height, ie the headers/footers). An optimisation here could be to accept a function like(itemType: string) => number
so the algorithm can more accurately estimate height?visible
props on item rows and only display the medias in the row ifvisible === true
(otherwise there are a placeholder), maybe it could help here? But I am not sure how to properly set thevisible
props with<FlashList>
. Should I useRenderTarget !== "Measurement"
for this?What do you think? Thanks a lot for your opinions 😄
Beta Was this translation helpful? Give feedback.
All reactions