Skip to content

About

High-performance vertical video feed for React Native, built on FlashList v2.

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


React Native Flash Reels

High-performance vertical video feed for React Native, built on FlashList v2. Optional prefetch, poster-first, quality ladders, and RN Video disk cache for Instagram-like swipe UX.

React Native Flash Reels Banner

Demo

Flash Reels demo Flash Reels demo

Full demo video (MP4)


Features

  • FlashList v2 snap paging (New Architecture)
  • Auto play/pause from viewability + single-tap pause
  • Double-tap like, mute controls, optional progress bar
  • Opt-in HTTP/poster prefetch with directional warm-up, concurrency cap, and mid-fling prediction
  • Opt-in poster / blur-first until the first frame
  • Opt-in RN Video disk cache (videoCacheEnabled)
  • Optional progressive quality ladder / HLS-ready ABR docs
  • Optional networkAware (NetInfo peer) for cellular/offline budgets
  • Custom overlay and video engine via render props
  • Decoder preload window to cap concurrent players (preloadStrategy, drawDistancePages)

Requirements

Package Version
@shopify/flash-list >= 2.0.0
react-native-video >= 6.0.0
react-native-reanimated >= 4.0.0
react-native-worklets >= 0.12.0
react-native-gesture-handler >= 2.0.0

Requires the React Native New Architecture.

Installation

npm install react-native-flash-reels @shopify/flash-list react-native-video react-native-reanimated react-native-worklets react-native-gesture-handler
yarn add react-native-flash-reels @shopify/flash-list react-native-video react-native-reanimated react-native-worklets react-native-gesture-handler

See the installation guide for Babel / gesture-handler setup (and the optional iOS video-cache Podfile flag).

Quick Start

import {
  FlashReels,
  useFlashReels,
  MuteButton,
} from 'react-native-flash-reels';
import type { ReelData } from 'react-native-flash-reels';

type Reel = ReelData & { username: string; caption: string };

const data: Reel[] = [
  {
    id: '1',
    videoUri: 'https://example.com/one.mp4',
    posterUri: 'https://example.com/one.jpg',
    duration: 12.5,
    username: 'maya',
    caption: 'Golden hour',
  },
];

function Overlay({ item }: { item: Reel }) {
  const { isMuted } = useFlashReels();
  return (
    <>
      <MuteButton />
      <Text>@{item.username}</Text>
      <Text>{item.caption}</Text>
      <Text>{isMuted ? 'Muted' : 'Sound on'}</Text>
    </>
  );
}

export function ReelsScreen() {
  return (
    <FlashReels
      data={data}
      defaultMuted
      showProgressBar
      prefetchEnabled
      prefetchWindowSize={2}
      showPosterUntilReady
      videoCacheEnabled
      onLike={(item) => console.log('liked', item.id)}
      renderOverlay={(item) => <Overlay item={item} />}
    />
  );
}

Prefetch & performance

Prop What it does
preloadWindowSize / preloadStrategy Decoder neighbors (default symmetric ±1); directional biases ahead
drawDistancePages FlashList draw distance in pages (default preloadWindowSize + 1)
prefetchEnabled Warms posters + a tiny HTTP Range of upcoming URIs (no extra decoders)
prefetchWindowSize / prefetchStrategy How far / how to bias prefetch (directional or symmetric)
prefetchMaxConcurrent Cap concurrent video Range warms (default 2)
networkAware Optional NetInfo peer — tune start quality / prefetch on cellular
showPosterUntilReady / posterBlurRadius Blurred poster until first frame (default on; overlay, not opacity)
videoCacheEnabled / bufferConfig.cacheSizeMB RN Video disk cache (Android runtime; iOS needs Podfile flag)

Mid-fling scroll prediction warms prefetch and decoder mounts for the landing page; playback still settles via viewability. Pass posterUri on each reel. Rank feeds on your backend and optionally set prefetchPriority on items. Install @react-native-community/netinfo when using networkAware.

Full guide: Performance.

Documentation

Full API reference, guides, and examples are available on the official documentation website.

Changelog

See CHANGELOG.md for release history (0.3.0).

Contributing

Contributions are welcome! Please read CONTRIBUTING.md before submitting a pull request.

License

MIT

About

High-performance vertical video feed for React Native, built on FlashList v2.

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages