react-native
react-native copied to clipboard
Feat: Move `FlatList`s to `@react-native/flat-lists` package
Summary
This PR moves FlatList, SectionList and related files (tests, etc.) to a new package @react-native/flat-lists located under packages/flat-lists as proposed in #35263
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 FlatLists to @react-native/flat-lists package.
FlatList and SectionList are now available in @react-native/flat-lists package.
Warning: This is a breaking(?) change, and you may need to update your imports to use the new package.
Test Plan
- ensure
yarn lint && yarn flow && yarn testis#00ff00
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| android | hermes | arm64-v8a | 8,520,731 | +699 |
| android | hermes | armeabi-v7a | 7,836,751 | +822 |
| android | hermes | x86 | 9,000,706 | +858 |
| android | hermes | x86_64 | 8,855,902 | +729 |
| android | jsc | arm64-v8a | 9,141,696 | +275 |
| android | jsc | armeabi-v7a | 8,333,645 | +287 |
| android | jsc | x86 | 9,196,198 | +282 |
| android | jsc | x86_64 | 9,454,318 | +285 |
Base commit: 928f4fb9b4984f6105e9dea2ce3cab628522982c Branch: main
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| ios | - | universal | n/a | -- |
Base commit: d9ade19b711fae03838581ff2564185d5b7a24cb Branch: main
PR build artifact for 083b0448c43227649beef7c87ff2695316541235 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for 083b0448c43227649beef7c87ff2695316541235 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
Depends on #35406
PS: do tag me in comments/reply
TODOs: Once the dependent PR is merged;
- [x] Rebase
- [x] Fix CI (flow)
Tests

PR build artifact for de2c5be7b4623bee8344212ef5e4629f2cd9c923 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for de2c5be7b4623bee8344212ef5e4629f2cd9c923 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for 17ce59e4ca4e75e47557af84ff75aa9eaec7a5a7 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for 17ce59e4ca4e75e47557af84ff75aa9eaec7a5a7 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for c3302acbbac3fa3fc4f6ab022548f179a94793be is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for c3302acbbac3fa3fc4f6ab022548f179a94793be is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for 0074ab579bb16185c679bdf5a40d57b9ee31ad26 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for 0074ab579bb16185c679bdf5a40d57b9ee31ad26 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
This package should have the virtualized-lists package as a dependency, rather than creating circular dependencies. —necolas
@NickGerleman / @necolas If I'm right, (from virtualized-lists pkg, PR discussions) we don't need to add @react-native/virtualized-lists as dep in this (@react-native/flat-lists) pkg, and instead import from the public entry point?
PR build artifact for 6103302e7113bcf4c3e2938fe13ba7b7d74faea8 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for 6103302e7113bcf4c3e2938fe13ba7b7d74faea8 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for dcb0a8735bf95aa4b533e29e5a44d8af07771110 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for dcb0a8735bf95aa4b533e29e5a44d8af07771110 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for d67acb34240aba356081b0ea04962627ac4f4b20 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for d67acb34240aba356081b0ea04962627ac4f4b20 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
@gabrieldonadel can you help me with these https://app.circleci.com/pipelines/github/facebook/react-native/17862/workflows/19e750f6-a614-4430-b201-aadc52fd0558/jobs/366958?invite=true#step-108-71,? (expect those which are related to @react-native/virtualized-lists)
Tests are failing, even though they're exported here packages/flat-lists/Lists/SectionList.d.ts
@gabrieldonadel can you help me with these https://app.circleci.com/pipelines/github/facebook/react-native/17862/workflows/19e750f6-a614-4430-b201-aadc52fd0558/jobs/366958?invite=true#step-108-71,? (expect those which are related to
@react-native/virtualized-lists)Tests are failing, even though they're exported here
packages/flat-lists/Lists/SectionList.d.ts
That's because Flow tests are falling not TypeScript ones and SectionList.d.ts is only TS
Update:
- rebased (reverted Verdaccio config..)
- fixed errors except those related to
@react-native/virtualized-lists
PR build artifact for 1a89cc81deeb6541fd5a3c1a6aae1e3a5977e7af is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for 1a89cc81deeb6541fd5a3c1a6aae1e3a5977e7af is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for 4da2afef2fc2ea5f04266aca0c46847944710ecf is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
PR build artifact for 4da2afef2fc2ea5f04266aca0c46847944710ecf is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.
@Pranav-yadav now that https://github.com/facebook/react-native/commit/2e3dbe9c2fbff52448e2d5a7c1e4c96b1016cf25 was merged can you rebase this from main?
@Pranav-yadav now that 2e3dbe9 was merged can you rebase this from main?
Sure. Thanks for the ping.
@NickGerleman / @hoxyq I have rebased this PR on main as the @react-native/virtualized-lists commit were merged.
Requesting another round of review.
Update:
- rebased on main
- fixed some typescripts errors
cc: @necolas
PS: Since this PR is being tracked under umbrella issue(s) you may add Tech: Monorepo label ...