Skip to content

SectionList -> SectionListModern: Refactor to functional component  #31322

@lunaleaps

Description

@lunaleaps

Description

React Native team is modernizing their core APIs and components. Part of this work is refactoring components to be functional to make it easier to reason about side effects. This issue details the work to refactor SectionList into a functional component.

We'll need to place this work behind an experiment so there will be a little coordination needed where the type interface of the two versions should be equivalent and an injection will be needed similar to:

unstable_VSL: (null: ?VirtualizedSectionList),

To get started on this issue, first focus on creating a SectionListModern.js that can be substituted in RNTester examples

Expected Results

Create a functional SectionList (SectionListModern.js) using hooks: https://reactjs.org/docs/hooks-intro.html with the same type interface as present day SectionList.js

[Internal FB] Note upon completion

  • Close T88479799 if complete

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions