Skip to main content

Introduction

SectionFlow is a high-performance section list component for React Native with cell recycling, sticky headers, and collapsible sections.

Why SectionFlow?

React Native's built-in SectionList re-renders the entire list when data changes, leading to performance issues with large datasets. SectionFlow solves this by:

  • Cell Recycling - Reuses rendered cells for off-screen items (like FlashList)
  • Absolute Positioning - All cells positioned absolutely for smooth 60fps scrolling
  • Type-based Pools - Cells recycled by type for optimal memory usage
  • Sticky Headers - Section headers stick to top during scroll
  • Collapsible Sections - Expand/collapse sections with a single API call

Performance Comparison

FeatureSectionListFlashListSectionFlow
Cell RecyclingNoYesYes
Section HeadersYesNoYes
Sticky HeadersYesNoYes
Collapsible SectionsNoNoYes
Memory EfficientNoYesYes

Quick Example

import { SectionFlow } from 'sectionflow';

const sections = [
{ key: 'fruits', title: 'Fruits', data: ['Apple', 'Banana', 'Orange'] },
{ key: 'veggies', title: 'Vegetables', data: ['Carrot', 'Broccoli', 'Spinach'] },
];

function MyList() {
return (
<SectionFlow
sections={sections}
renderItem={({ item }) => <Text>{item}</Text>}
renderSectionHeader={({ section }) => <Text>{section.title}</Text>}
stickySectionHeadersEnabled
collapsible
/>
);
}

Installation

# npm
npm install sectionflow

# yarn
yarn add sectionflow

# bun
bun add sectionflow

Next Steps