◉RORK LABJP
●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SONNET 4.5 — Retires on the Claude API on 11/30, 27 days left. If your app calls it, check the migration target●SDK 58 — Moves to React Native 0.88. R8 is now on by default in Android release builds, and iOS prebuild generates a SceneDelegate●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SONNET 4.5 — Retires on the Claude API on 11/30, 27 days left. If your app calls it, check the migration target●SDK 58 — Moves to React Native 0.88. R8 is now on by default in Android release builds, and iOS prebuild generates a SceneDelegate●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…
Articles/Dev Tools
⬡ Dev Tools/2026-06-21Advanced

Add Long-Press Drag Reordering to Your Rork Favorites List Without the Jank

A practical walkthrough for retrofitting long-press drag reordering onto a Rork-generated favorites list: keeping re-renders down, respecting the worklet boundary, persisting the order, and avoiding ghost cards and scroll conflicts.

Rork611React Native242Reanimated10drag to reorderstate management5

✦ Premium Article

Letting users rearrange their favorites by hand is one of those features that sounds trivial until you build it. As an indie developer, I run a set of wallpaper apps on both the App Store and Google Play, and the moment I shipped a favorites feature, requests came in to "let me put the ones I use most at the top."

Ask Rork to "make the favorites draggable to reorder," and it usually produces something that looks right but feels wrong on a real device: cards lag behind your finger, or the order snaps back the instant you let go. The generated code tends to be a FlatList with a hand-rolled PanResponder bolted on top, and that is exactly where the trouble starts.

Let's fix it from the failure points inward. The example targets the React Native (Expo) output of Rork, but the same reasoning carries over to Rork Max's SwiftUI output when you add .onMove to a List.

The three walls you hit with drag reordering

Drag-to-reorder looks like "move a card to where the finger is," but three problems show up at once.

The first is dropped frames. If a re-render fires every frame as the finger moves, the JavaScript thread clogs and the card trails behind. To hold 60fps you have to run the drag movement on the UI thread (a worklet), not on the JS thread.

The second is duplicated state. The "visual order" during the drag and the "data order" you persist on release are easy to model as two separate things, and if you reconcile them sloppily, the order rolls back the moment the user lifts their finger.

The third is scroll conflict. In a vertical list, both dragging and scrolling are up-and-down gestures, so unless you decide which wins, scrolling breaks or the drag never starts.

Trying to handle all three with a custom PanResponder balloons the code and breaks across devices. I burned a few hours trying to push a hand-written version through, and my takeaway is that for solo development, leaning on a proven library is the sturdiest choice.

Choosing a library — draggable-flatlist is the pragmatic answer

There are roughly three options for a reorderable list. Here is how they trade off.

OptionStrengthsWatch out for
Custom PanResponderZero dependencies, full controlYou own worklet-ization, scroll conflict, and device quirks
react-native-draggable-flatlistBuilt on Reanimated/Gesture Handler, smooth, short to implementIt is a FlatList inside, so very large data needs extra tuning
FlashList + custom layerFast rendering for huge listsYou still write the drag gesture layer yourself

For a favorites list of tens to a few hundred items, react-native-draggable-flatlist is the shortest and most stable path. It uses react-native-reanimated and react-native-gesture-handler internally and runs the drag movement in a worklet, so you don't have to cross the dropped-frame wall yourself.

When adding it to an Expo-managed Rork project, install Expo-compatible versions.

# Install into an Expo project (use Expo-compatible reanimated/gesture-handler)
npx expo install react-native-reanimated react-native-gesture-handler
npm install react-native-draggable-flatlist

After installing react-native-reanimated, don't forget to put its Babel plugin last in babel.config.js. If it is missing, worklets won't run and the drag simply won't respond.

// babel.config.js — the reanimated plugin MUST be last in the array
module.exports = function (api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: ['react-native-reanimated/plugin'], // ← must be last
  };
};
✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦If drag reordering felt broken on your Rork favorites list, you can get a smooth long-press implementation working today
✦You'll be able to diagnose and fix the three classic failures: stutter while dragging, order snapping back on release, and fights with vertical scroll
✦You can drop in a minimal persistence pattern that keeps the user's order across app restarts
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ Dev Tools2026-09-04
EAS secret visibility does not keep a value out of your app — deciding prefix and visibility separately
The EXPO_PUBLIC_ prefix decides what ships inside your app; EAS visibility decides who can read it. Why stacking them blanks a value on OTA updates, and how to check your build.
⬡ Dev Tools2026-08-22
Every bulk replace exited zero. The damage was in the lines I did not delete
Run a bulk replace over generated code and the breakage lands on the neighbouring lines, not the matched ones. Here is what broke in a live project, and a dependency-free guard that checks the invariants a replace must preserve.
⬡ Dev Tools2026-08-14
Find the native edits expo prebuild will erase before you upgrade to SDK 57
Expo SDK 57 makes expo prebuild clear and regenerate ios and android by default. Here is how to audit your hand edits first, move them into config plugins, and why 57.0.9 matters for Reanimated apps.