Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[VirtualizedSectionList] - Externalise and handle any sort of data blob #20787
[VirtualizedSectionList] - Externalise and handle any sort of data blob #20787
Changes from 8 commits
90baadb
cc92082
66c365a
c00db10
0762ef6
b1fe9b9
880c4dd
0168f7a
a25a136
dfe4994
5437f8b
edebcef
4ff6035
32a5e4c
1f00f8e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a regression. Could you work on putting back the proper Flow Type and running flow on the react-native repo to verify it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
SectionBase
type can't be specified, because it can handle different type of datas, like classic js object or Immutable object, by exemple the data type ofVirtualizedList
isany
.For
SectionList
componentSectionBase
can be specified because we know the data must be javascript object.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we fix this instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really an expert with complex flow typing, I can try to remove this, but I'm not sure if I'm going to fix something of fix it in a good way :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working on this at FB. I think this is supposed to stay
sections.length
here becausesections
is always an array. I'm changing this internally, no need to do anything, just wanted to put this comment here for your information.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpojer Thanks ! In fact it can be something else, by exemple if you use an immutable list, to get his length the method is
size
and notlength
so it's better to keep it outside to handle immutable data