Comments (10)
I think pairing up will help. We can try different approaches and find some better way hopefully. Benchmark in this case is tricky because there are so many use cases and we can easily chose one where it matters and one where it won't.
Let's dive into this on Friday.
from flash-list.
Should we create an issue to make the field optional for the opensource milestone?
I think this issue captures that and it's already in opensource milestone, so I don't think there's anything we need to do here as of now.
from flash-list.
After the call with William, we got another indicator requiring this prop will most likely confuse users and will not give a good first impression.
What I propose instead:
- use
initialNumToRender
and make it mandatory. We can use this number for the initial render. - After initial render, we can start refining the
estimatedItemSize
internally based on the already rendered elements
from flash-list.
I'm wondering how people will come up with that number too for e.g, that number will depend on screen size. Has to be different for mobile vs tablet. I worry that a lot of people will give a value larger than necessary.
from flash-list.
I'm wondering how people will come up with that number too for e.g, that number will depend on screen size.
Right, but I'd argue it's much easier to reason about than estimatedItemSize
. Additionally, the fact that FlatList
has this prop is a big plus imho.
Has to be different for mobile vs tablet.
estimatedItemSize
will be often different for tablet as well to be fair.
from flash-list.
Putting this as another example of people pushing against this prop. We either have to explain this prop a whole lot better or change it as it seems to confuse and frustrate developers.
I think it would be worth doing some profiling to assess how having the value off because of a poor default can detriment the performance. Doing so could make it more obvious the importance of the prop (if we decide to keep it or rename it to initialNumToRender
which still raise concerns regarding how to provide good value for it)
from flash-list.
I'll work on the doc today. Hopefully it'll clear things up.
Also, I've been thinking about initialNumToRender
and wonder if we had to give a value for our twitter sample how would we do that and what value we'd use?
I've looked at median height on phone vs tablet (S6 lite) and value change by only 13px. I think that's because device pixel ratio is also changing and 13px difference is totally fine. This is just one example though.
How would we replace it with initialNumToRender
? Thoughts?
from flash-list.
Also, I've been thinking about it initialNumToRender and wonder if we had to give a value for our twitter sample how would we do that and what value we'd use?
I'd say using a medium-sized device (I guess moto g 10 would work) and use the number of element we'd see on the initial screen as the base. The number needs to be a ballpark approximation anyway.
That being said, I suggest doing the benchmarking first - this will help us make a more informed decision about the necessity of this prop while also serving as a good documentation of the why it is necessary if we decide to keep estimatedItemSize
as-is. Let me know if you want help with that @naqvitalha.
from flash-list.
Adding this ticket API parity. Let's compute average internally and discuss whether we can make it optional.
from flash-list.
Should we create an issue to make the field optional for the opensource milestone? I think this is the last issue we need to create regarding this, and we could close this one after we make it optional. Right?
from flash-list.
Related Issues (20)
- Intermittent 'x' of undefined error in flashList using ranimated HOT 1
- Issue with shopify flashlist canvas
- Nested flashlist is not rendering properly, flickering issue on first render. HOT 4
- Section List implementation issues
- The item does not appear in the updated list after scrolling for Android ver. < 8 HOT 4
- `CellContainer` app crash HOT 6
- changing data after scrolling causes over-rendering and performance degradation HOT 5
- Re render issue in android HOT 1
- Style Mismatches from Flatlist HOT 1
- Unnecessary items rendering when list item size changes HOT 1
- extraData does not seem to work for sticky headers HOT 1
- For Android with Float screen width, snapToOffset, snapToInterval is incorrect in the flash list HOT 2
- Flashlist not working with reanimated useAnimatedProps HOT 2
- ListFooterComponent moves down an extra row every time underlying list data is updated HOT 1
- Android Build Error Encountered Using Expo EAS
- Typing error in props viewabilityConfigCallbackPairs HOT 1
- Masonry items stack in the first column to lengths far beyond that of the second column without apparent reason HOT 1
- Performance Optimization Doc Error
- ListEmptyComponent is upside down when inverted is true HOT 2
- Flashlist isn't functioning properly with pagingEnabled in Android; it jumps to the last index with just a small gesture HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flash-list.