Uh oh!
There was an error while loading. Please reload this page.
Feat: Move FlatLists to @react-native/flat-lists package - #35423
Feat: Move FlatLists to @react-native/flat-lists package#35423Pranav-yadav wants to merge 1 commit into
FlatLists to @react-native/flat-lists package#35423Conversation
Base commit: 928f4fb |
Base commit: d9ade19 |
pull-bot
commented
Nov 21, 2022
PR build artifact for 083b0448c43227649beef7c87ff2695316541235 is ready. |
pull-bot
commented
Nov 21, 2022
PR build artifact for 083b0448c43227649beef7c87ff2695316541235 is ready. |
083b044 to
de2c5beCompare
This comment was marked as resolved.
This comment was marked as resolved.
pull-bot
commented
Nov 21, 2022
PR build artifact for de2c5be7b4623bee8344212ef5e4629f2cd9c923 is ready. |
pull-bot
commented
Nov 21, 2022
PR build artifact for de2c5be7b4623bee8344212ef5e4629f2cd9c923 is ready. |
necolas
left a comment
There was a problem hiding this comment.
Have a look at the feedback on the VirtualizedList PR. Specifically:
- We should not be reaching inside any packages. Instead
@react-native/flat-listsshould export everything that can be imported, and it should import fromreact-nativeand not internal paths. - This package should have the virtualized-lists package as a dependency, rather than creating circular dependencies.
17ce59e to
c3302acComparepull-bot
commented
Nov 22, 2022
PR build artifact for 17ce59e4ca4e75e47557af84ff75aa9eaec7a5a7 is ready. |
pull-bot
commented
Nov 22, 2022
PR build artifact for 17ce59e4ca4e75e47557af84ff75aa9eaec7a5a7 is ready. |
pull-bot
commented
Nov 22, 2022
PR build artifact for c3302acbbac3fa3fc4f6ab022548f179a94793be is ready. |
pull-bot
commented
Nov 22, 2022
PR build artifact for c3302acbbac3fa3fc4f6ab022548f179a94793be is ready. |
c3302ac to
0074ab5Comparepull-bot
commented
Nov 22, 2022
PR build artifact for 0074ab579bb16185c679bdf5a40d57b9ee31ad26 is ready. |
pull-bot
commented
Nov 22, 2022
PR build artifact for 0074ab579bb16185c679bdf5a40d57b9ee31ad26 is ready. |
This comment was marked as resolved.
This comment was marked as resolved.
0074ab5 to
6103302Comparepull-bot
commented
Nov 23, 2022
PR build artifact for 6103302e7113bcf4c3e2938fe13ba7b7d74faea8 is ready. |
pull-bot
commented
Nov 23, 2022
PR build artifact for 6103302e7113bcf4c3e2938fe13ba7b7d74faea8 is ready. |
6103302 to
dcb0a87Comparepull-bot
commented
Nov 23, 2022
PR build artifact for dcb0a8735bf95aa4b533e29e5a44d8af07771110 is ready. |
pull-bot
commented
Nov 23, 2022
PR build artifact for dcb0a8735bf95aa4b533e29e5a44d8af07771110 is ready. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
2429a77 to
d67acb3Comparea6ce399 to
9e18d0aCompare@NickGerleman / @hoxyq I have rebased this PR on main as the Update:
cc: @necolas |
@necolas re-pinging, in case you missed.. 🙂 Edit: cc @cortinico |
@NickGerleman please let me know if should rebase again so that you can review it afterwards. I know this might not be prioritized but, I don't have any idea about it as well; (no one is replying), hence pinging again. |
Uh oh!
There was an error while loading. Please reload this page.
9e18d0a to
eb493e8CompareUh oh!
There was an error while loading. Please reload this page.
b4fc24f to
0b9a654CompareUh oh!
There was an error while loading. Please reload this page.
0b9a654 to
94c33d8CompareNickGerleman
commented
Mar 22, 2023
Sorry I haven't been able to take a close look at this (though it seems like you found some help on the Discord). Though as a general bit of feedback, I'm not sure it makes sense to add a new plural |
necolas
commented
Mar 22, 2023
They both also have the section list variant |
No worries :)
I did consider that at the start only but, it's not a
variants as well.. as Nicolas said.
Yeah. |
6b4891a to
600c5afCompareSummary: This diff moves `FlatList` and `SectionList` to a new package `@react-native/flat-lists`. This is a first step towards moving all the `FlatList`-related code to a separate package. This will allow us to make changes to the `FlatList` implementation without affecting the rest of the React Native codebase. Changelog: [General] [Changed] - Move `FlatList`s to `@react-native/flat-lists` package. `FlatList` and `SectionList` are now available in `@react-native/flat-lists` package. **Warning**: This though this is NOT a breaking change, and you will NOT need to update your imports to use the new package. But, moving forward it will be better to install `@react-native/flat-list` if you want to import explicitly.
600c5af to
7184780ComparePranav-yadav
commented
Mar 23, 2023
🎉 All Green !!Will anyone import this? |
| */ | ||
| import typeof ScrollViewNativeComponent from 'react-native'; | ||
| import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet'; |
There was a problem hiding this comment.
Please can we avoid having any imports from RN internals in this package
There was a problem hiding this comment.
Yeah. I forgot that; this way it may not work in external projects.
Right now I'm in college, will try to change it once I reach home.
Thanks.
There was a problem hiding this comment.
Sorry for the delay. I'm busy with assignment tests at college, will try to look at this; tomorrow eod..
There was a problem hiding this comment.
can we avoid having any imports from RN internals in this package
@necolas in order to avoid all of them, we'll need to export some other modules from react-native such as,
deepDiffer
@NickGerleman Are there any issues against that? If no issues, then should I open separate PR(s) for those changes or it is fine to do it in this PR only?
Apologies if this has been discussed already, but might it be simpler to just include these files in the @react-native/virtualized-lists package? Is there any advantage to keeping them separate? Edit: Oh, this is the same feedback @NickGerleman had above: #35423 (comment) |
Pranav-yadav
commented
Jun 15, 2023
Theoretically "Yes". But, both lists were implemented and exist for a special (different) purpose, keeping them separate would support the initial cause of "separation of concerns". If we combine them into a "single" package:
WDYT? P.S.: Personally, I would've loved to have them in a single package named |
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This PR was closed because it has been stalled for 7 days with no activity. |

Summary
This PR moves
FlatList,SectionListand related files (tests, etc.) to a new package@react-native/flat-listslocated underpackages/flat-listsas proposed in #35263This is a first step towards moving all the
FlatList-related code to a separate package.This will allow us to make changes to the
FlatListimplementation without affecting the rest of the React Native codebase.Changelog
[General] [Changed] - Move
FlatLists to@react-native/flat-listspackage.FlatListandSectionListare now available in@react-native/flat-listspackage.Warning: This is a breaking(?) change, and you may need to update your imports to use the new package.
Test Plan
yarn lint && yarn flow && yarn testis#00ff00