-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Open
Labels
BugComponent: VirtualizedListHelp Wanted
Issues ideal for external contributors.Issues ideal for external contributors.JavaScriptNewer Patch AvailableResolution: PR SubmittedA pull request with a fix has been provided.A pull request with a fix has been provided.
Description
- Review the documentation
- Search for existing issues
- Use the latest React Native release - using version 0.55.2 did not see any changes to the FlatListComponent since that version.
Environment
Run react-native info
in your terminal and paste its contents here.
Environment:
OS: Windows 10
Node: 8.11.1
Yarn: 0.21.3
npm: 5.8.0
Watchman: Not Found
Xcode: N/A
Android Studio: Version 3.0.0.0 AI-171.4408382
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: ^0.55.2 => 0.55.4
Description
I used the npm package why-did-you-update to help optimize my components and prevent re-renders. However there is a re-render that I cannot control. This happens for every item in the list. My gues
CellRenderer.props: Changes are in functions only. Possibly avoidable re-render?
Functions before: {onLayout: ƒ}
Functions after: {onLayout: ƒ}
It seems this is caused by an anonymous function at
onLayout={e => this._onCellLayout(e, key, ii)} |
I propose that this function be defined on the class to prevent unnecessary re-renders.
erandagan, matthargett, m-cho, noomorph, brunolemos and 2 more
Metadata
Metadata
Assignees
Labels
BugComponent: VirtualizedListHelp Wanted
Issues ideal for external contributors.Issues ideal for external contributors.JavaScriptNewer Patch AvailableResolution: PR SubmittedA pull request with a fix has been provided.A pull request with a fix has been provided.