A high-performance timeline component built with React Native and Shopify's FlashList, demonstrating optimized rendering for large datasets with smooth scrolling and efficient memory usage.
The app showcases a clean, component-based architecture:
- Timeline Component: Main container using FlashList for optimal performance
- Timeline Items: Individual event cards with status indicators and icons
- Section Headers: Date grouping with smart "Today/Yesterday" labels
- Mock Data: Realistic sample data spanning multiple days
- Theming System: Consistent color scheme across light/dark modes
Screen.Recording.2026-02-05.at.5.46.37.pm.mov
-
Install dependencies
bun install
-
Start the development server
bun start
-
Run on your preferred platform
- iOS: Press
ito open in iOS Simulator - Android: Press
ato open in Android Emulator - Scan QR code with Expo Go app on your device
- iOS: Press
The timeline displays activity events with:
- Event Title: Clear, descriptive labels
- Description: Additional context when available
- Timestamp: Precise time information
- Status Icons: Visual indicators using SF Symbols
- Interactive Elements: Tap any event to see more details
- React Native: Cross-platform mobile framework
- Expo: Development platform and tooling
- TypeScript: Type-safe JavaScript
- FlashList: High-performance list component
- React Navigation: Navigation and routing
- Expo Symbols: Native icon support
├── components/
│ ├── timeline/
│ │ ├── timeline.tsx # Main timeline component
│ │ ├── timeline-item.tsx # Individual event items
│ │ └── timeline-section-header.tsx
│ ├── ui/
│ │ └── icon-symbol.tsx # Icon component
│ ├── haptic-tab.tsx # Haptic tab component
│ └── themed-*.tsx # Reusable themed components
├── data/
│ └── mock-timeline-events.ts # Sample data
├── types/
│ └── timeline.ts # TypeScript definitions
├── constants/
│ └── theme.ts # Color scheme definitions
├── hooks/
│ ├── use-color-scheme.ts # Color scheme hook
│ └── use-theme-color.ts # Theme color hook
└── app/
├── _layout.tsx # Root layout
└── (tabs)/
├── _layout.tsx # Tab layout
└── index.tsx # Timeline screen (main screen)
- Performance Optimization: FlashList implementation for handling large datasets
- Component Composition: Reusable, composable React components
- State Management: Efficient data grouping and rendering
- TypeScript Integration: Strong typing for better development experience
- Theming: Dynamic theming support for multiple color schemes
- Responsive Design: Adaptive layouts for different screen sizes
The timeline component is highly customizable:
interface TimelineProps {
events: TimelineEvent[];
onEventPress?: (event: TimelineEvent) => void;
}Add your own data by providing an array of TimelineEvent objects with the required fields.
This project serves as a demonstration of React Native best practices with FlashList. Feel free to fork and adapt for your own use cases!
This project is open source and available under the MIT License.