Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51496
Fixes problem with generics passed to `VirtualizedSectionList` in generated types. The `flow-api-translator` creates a re-declaration for `export default` variables which shadows generics.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D75141051
fbshipit-source-id: 260ef066038320eee3ffa93692f77f1eff5c9205
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50846
## Motivation
After a more rigorous search through GitHub uses of the restricted APIs, and consultation with framework authors, it became apparent that this restriction should be lifted.
Changelog: [Internal]
Reviewed By: zeyap
Differential Revision: D73267844
fbshipit-source-id: e6c0c146690c07debf74c51f82171a9239be5c15
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50392
## This diff
Defines an exports field for the "react-native/virtualized-lists" package. Limits internal use of subpath
imports to virtualized-lists package, and exports all currently used APIs one the root level.
Changelog:
[General][Breaking] - Subpath imports to the internal react-native/virtualized-lists package are not allowed.
Reviewed By: huntie
Differential Revision: D72162344
fbshipit-source-id: 828dab8e569f019fc48084af475e152b898f5bb5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50225
Updates `index.js.flow` to export (what should be) all public types for `react-native`, closely matching the resolved exported types of `types/index.d.ts` (current manual TS defs).
- Note that this first pass doesn't have to be exhaustive (not yet load bearing) — however, I've done a best-effort scan, which passes our current `__typetests__` fixtures.
**Approach: Explicit type imports in `index.js.flow`**
We have a number of options for how we organise and re-export values and types from the new index file — for now, we're opting for explicitly exporting each symbol here.
- While this clutters the index file somewhat, it also provides a single scannable source of truth — without introducing / altering each contributing module's type exports (we might want to do this eventually, but we're far from having strong organisation denoting the public API boundary). It's self-documenting that the index file contains all root exports by name.
- At the same time, we currently have some exceptions that use `export [type] *` to line up with TypeScript `namespace`s. We aim to review and update these within this release cycle, to enforce the above system.
Changelog: [Internal] - The `react-native` package now exports all public types in Flow (fbsource)
Reviewed By: rubennorte
Differential Revision: D71741575
fbshipit-source-id: 770e2b490e494ee195f4240358fec39f69145a94
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49262
Changelog: [General][Breaking] Deep imports into `react-native/virtualized-lists` with require syntax may need to be appended with `.default`
Reviewed By: huntie
Differential Revision: D69308532
fbshipit-source-id: 6de15d46e0931616bc9849edbccb7cf745e15dd5
Summary:
CellRendererComponent can be given a more useful description, and more constrained type, to ensure it is used more correctly.
Changelog:
[General][Fixed] - Fix types + documentation for CellRendererComponent
Reviewed By: yungsters
Differential Revision: D43925572
fbshipit-source-id: 26aae6a2df989993c97709ffbf1544df7cbae036
Summary:
This change reverts D41745930 (https://github.com/facebook/react-native/commit/2e3dbe9c2fbff52448e2d5a7c1e4c96b1016cf25) as part of a stack to splice back source history which was lost (Git registered the file moves as additions).
It is expected this diff will individually fail. The entire stack should be applied at once.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D43068113
fbshipit-source-id: c8398629fe5dcc1ca4bf02f550adc00c78a8487a