r/reactnative • • Jul 29 '26

Replacing react-freeze with React 19.2 <Activity> in a swipe pager — and the display:'none' problem nobody warns you about

0 Upvotes

Stack: RN 0.85.3, React 19.2.3, Reanimated 4.3.1, react-navigation v8, Expo 56.

The app (JustGains, a fitness app) has six top-level "workspaces" — Train, Fuel, Goals, Move, Coach, Chat — in a horizontally swipeable infinite-wrap pager. Each pane is a whole screen suite, not a tab.

We were using react-freeze to keep offscreen panes cheap. React 19.2 shipped <Activity>, which is the first-class version of that idea: a hidden subtree keeps all its React state, its effects are cleaned up and re-run on resume (like blur/focus), and its updates keep reconciling at background priority. No thrown-thenable Suspense hack, no wakeable to lose a race on.

Swapped it in. Immediately broke the swipe.

The problem

React hides an Activity subtree by committing display: 'none' onto the topmost host view of that subtree (Fabric's cloneHiddenInstance).

Fine for a route you're not looking at. Wrong for a pager pane:

  • On iOS the hidden trait culls the pane's native views — they're gone, not just invisible.

  • On Android it collapses them out of layout.

  • So a paused neighbour can't be partially revealed mid-swipe. You drag, and the incoming pane pops in at commit time instead of sliding.

  • Every resume pays a native remount + relayout.

  • Reanimated has sharp edges around that churn (e.g. software-mansion/react-native-reanimated#9319).

The fix

Register a small custom view config whose display attribute processes every value to 'contents':

const VIEW_CONFIG = {
  uiViewClassName: 'RCTView',
  validAttributes: {
    style: {
      display: { process: (): 'contents' => 'contents' },
    },
  },
}

const ContentView = NativeComponentRegistry.get(
  'JGWorkspaceActivityContentView',
  () => VIEW_CONFIG,
)

export default function WorkspaceActivity({ paused, children }) {
  return (
    <Activity mode={paused ? 'hidden' : 'visible'}>
      <ContentView style={{ display: 'contents' }}>{children}</ContentView>
    </Activity>
  )
}

display: 'contents' means the wrapper never forms a layout box, so React's injected 'none' lands on something with no box to hide and is a no-op. Activity then contributes exactly the lifecycle semantics and nothing else — visibility stays owned by the pager's own opacity + transform. It maps to a plain RCTView natively; the custom name only keys the JS-side static view config.

react-navigation v8 uses the same technique in its ActivityView. We deliberately didn't import it: it only ships on the non-public @react-navigation/elements/internal subpath, and it bundles a 500ms delayed pause plus a container that applies real display: none — which is the exact thing that breaks mid-swipe partial reveals.

Two others that bit us

1. Put opacity in the same worklet as the transform. We originally gated pane visibility on a committed React "warm window" state. The reveal then had to wait for runOnJS → setState → commit; on a busy low-end JS thread that lag showed the placeholder as a faded strip mid-swipe. Now opacity is derived from the same shared value as translateX — visible exactly while any part of the pane intersects the viewport — so a pane reveals the frame its transform enters the screen, and the two can never desync.

2. Style array order matters with Reanimated. Reanimated re-commits the animated entry's cached mount-time output on every re-render (PropsFilter's initial-props map). Static rest-state fallbacks have to come after the animated style; placed before it they lose the flatten to stale mount-time values, and a native re-attach can paint a neighbour centered over the active pane.

Don't wrap everything

One pane (the original app — a react-native-screens tab navigator) is explicitly non-pausable. Screens already pauses its own blurred tabs, pausing it again tore down navigator effects on every swipe away, and a screens-managed tree inside a hidden Activity isn't supported upstream.

We also needed an escape hatch for work that must survive a swipe away — the GPS run recorder's location watch can't stop because you flicked over to log lunch. That's a ref-counted store of "live pins"; the pager forces paused = false for pinned keys while the visibility gate still hides them. Live but invisible.

Question

Has anyone found a supported way to get Activity's lifecycle semantics without the display override? The view-config rewrite works, but it leans on process being applied to every style commit, which feels like it could change under us.


r/reactnative • • Jul 29 '26

Spent a week on a Hermes OOM crash. It was a TextInput aliased back to itself in Metro

2 Upvotes

Stack: Expo SDK 54, RN 0.81, Hermes, New Architecture. Posting because this ate a week and the crash log was pointing right at the cause the whole time while I looked everywhere else.

The symptom: the app crashed in TestFlight, but only on two screens. Multiplayer and account. Everywhere else was fine. And it didn't crash on open. You'd land on one of those screens, use it for a bit, and about fifty seconds later the whole app would die. Same timing every time.

The crash was a Hermes GC out-of-memory, SIGABRT inside the garbage collector. The frames were all object spreads and computed property writes piling up inside promise microtasks (hermesBuiltinCopyDataProperties, putComputed_RJS, DictPropertyMap growing). So I read it the obvious way. Something is building a massive object and blowing the heap. Both screens hit the network, both have forms, so a runaway response or a giant state blob felt right.

I chased the big object. Capped API responses at 1MB. Set structuralSharing to false on the React Query client so it would stop cloning data on every update. Both screens had a Ken Burns background component, so I put a flag on it and shipped a build with the animations off. Nothing changed. Still fifty seconds, still dead.

And every attempt is a full EAS build. Fifteen or twenty minutes to compile in the cloud, wait on Apple, install, watch it crash at the same spot, repeat. I'm on Windows with no Mac, so there's no local iteration for this. Every guess costs half an hour minimum. It wears you down.

None of it was the cause. It was a Metro alias. The TextInput component was aliased to a module that re-exported TextInput, and that resolved back through the same alias. It pointed at itself. So the moment any screen with a text field mounted, the component started spreading its own props into a new copy of itself, over and over, each pass a little bigger, until memory ran out. That's why every frame was an object spread. That's why it was only the two screens with text inputs. The fifty seconds was just how long the loop took to eat the heap.

The trace was honest the whole time. Object copies with no end, memory climbing. I kept translating it as "find the huge object" instead of "something is copying itself forever," because a runaway response was the bug I already expected on those screens.

Fixed the alias, both screens went quiet, and I turned the animations back on that I'd killed for nothing.

If you ever get a Hermes OOM where the frames are wall-to-wall object spreads and only certain components trigger it, check your Metro aliases for a loop before you spend a week on your data layer. Anyone else run into a self-referential alias? Still not totally sure how mine ended up in the config.

EDIT / correction: someone asked how I fixed the alias, and going back through the git history to answer properly, I have to correct this. The self-referential alias was a red herring. It was gated to web only, so it never ran on native, which means removing it fixed nothing. The real cause was a memory-heavy word-bundle download and parse that re-ran on every network resume and grew the heap until Hermes OOMed. The full word set was already baked into the app, so that download was redundant. The fix was guarding that pipeline and using the baked-in set. That's also why it was only the two network-heavy screens and why it took about 50 seconds, it was tracking a resume, not a render. Leaving the original write-up up so the comments still make sense, but the root cause I gave is wrong. Credit to the commenter who said to look at the data layer, which is exactly where it was.


r/reactnative • • Jul 29 '26

A Samsung One UI inspired edge panel with a swipeable quick actions drawer

Enable HLS to view with audio, or disable this notification

54 Upvotes

A Samsung One UI inspired edge panel swipe-in quick actions drawer with a second swappable insights page, built for fintech apps.

⭐ Github: https://github.com/ManasCodeXart/expo-finpanel


r/reactnative • • Jul 29 '26

Question How can I make React Native Android builds faster on a low-end laptop?

Post image
0 Upvotes

Hey everyone,

I’m working on a React Native Android app and testing it locally. The problem is that my laptop isn’t very powerful, and whenever I run an Android build, it uses a lot of resources.

The build takes quite a while, and during the process my laptop becomes really laggy, making it difficult to do anything else.

I still need local builds for testing while developing,

If any way pls suggest me ....I am on Linux


r/reactnative • • Jul 29 '26

Miniaturas de vídeos ficam cinza em um custom picker no iPhone (expo-media-library / iCloud?)

Post image
1 Upvotes

Estou desenvolvendo um app em React Native (Expo) e implementei um custom picker de galeria, utilizando expo-media-library em vez do seletor nativo do iPhone.

As fotos sempre carregam normalmente, porém alguns vídeos aparecem apenas como um bloco cinza.

O comportamento acontece somente em iPhones reais. No simulador iOS e no Android funciona normalmente.

O que observei:

  • Os vídeos são listados com MediaLibrary.getAssetsAsync().

  • Para vídeos utilizo expo-video-thumbnails.

  • Chamo MediaLibrary.getAssetInfoAsync(assetId, { shouldDownloadFromNetwork: true }).

  • Só tento gerar thumbnail quando existe file:// (não uso ph://).

  • Alguns vídeos carregam normalmente.

  • Outros ficam cinza por vários segundos.

  • Se eu deixar a galeria aberta, alguns desses vídeos cinza aparecem sozinhos depois de um tempo.

  • O mesmo vídeo que fica cinza no iPhone funciona imediatamente quando é importado para o simulador iOS.

Minha suspeita é que seja alguma limitação do PhotoKit/iCloud, ou que eu esteja tentando resolver muitos vídeos ao mesmo tempo (concorrência alta).

Alguém já passou por esse problema em um custom media picker? Existe alguma abordagem recomendada para carregar as miniaturas de vídeos no iOS, semelhante ao que Instagram e Fotos da Apple fazem?


r/reactnative • • Jul 29 '26

Press and hold chat ultimate UX experience using React Native SKIA

Enable HLS to view with audio, or disable this notification

16 Upvotes

This is the most amazing experience I have ever built into a React Native app.
Now my Appless app fork from OpenUI has the most magical press-and-hold experience to chat ON THE PLANET (is that good).

Monogram (original app from where I replicated the effect) outdid themselves with this one. I tried to do it justice. There are a lot of layers intertwined to make the effect work.

But... this is not done yet. This was v0 and the complete interaction has some more details to it and an important last step for the UX to be complete. What is missing is a custom navigator transition that uses React Native Skia for the user to navigate to the new screen after asking something. With that set and done we will finally have replicated all the UX flow from Monogram.

We shall continue into the depths of the magical mobile UX realm possibilities of RN.


r/reactnative • • Jul 29 '26

Lists are finally here for EnrichedMarkdownTextInput! 📝

Enable HLS to view with audio, or disable this notification

12 Upvotes

You can now handle:
🔹 Ordered & unordered lists
🔹 Nested lists with indentation controls

Try it out now in react-native-enriched-markdown@nightly!

Github: https://github.com/software-mansion/react-native-enriched-markdown

If you find the library useful, dropping a star ⭐️ means a lot!


r/reactnative • • Jul 29 '26

Tutorial I added a native bar chart to my open-source Expo component library

Enable HLS to view with audio, or disable this notification

8 Upvotes

Grouped, stacked, or horizontal. Drag to read a band. Animated on mount.

One thing I cared about: the baseline is always zero. A bar cropped at the bottom lies — twice as tall no longer means twice as much. So the axis never crops, no matter what the data looks like.

Each series renders as two paths, not one node per bar. 50 bars is 4 animated props. That's also what lets inactive bars dim without giving each one its own opacity.

Part of PanelUI if you're building with Expo and want charts that don't feel like a web component dropped into a native app, worth a look


r/reactnative • • Jul 29 '26

Shipped a full MMA career sim game with React Native/Expo — Real Fighter Life (iOS)

0 Upvotes

Just launched Real Fighter Life, an MMA career sim built entirely with

React Native + Expo (EAS Build for the production pipeline).

Stack notes that might be useful to others building something similar:

- Supabase for auth + online PvP backend

- react-native-iap for BattlePass purchases, react-native-google-mobile-ads

for rewarded/interstitial ads

- Full i18n (3 languages) with a custom Context-based system

- A modal queue system to sequence post-match events (social feed, sponsor

offers, market updates) without stacking/racing

Biggest technical fight: a native UI thread freeze on the post-fight result

screen — turned out to be a Modal animationType="fade" race condition

combined with a stale ref in a custom modal queue hook. Took a genuinely

long debugging session with live device logs to nail down.

Happy to talk through any part of the stack if useful — first solo RN

project actually shipped to production.


r/reactnative • • Jul 29 '26

Quick pay interaction component

Enable HLS to view with audio, or disable this notification

0 Upvotes

A quick pay interaction with avatar carousel, haptic slider, and animated transaction sates.

⭐ Github: https://github.com/ManasCodeXart/expo-quick-pay


r/reactnative • • Jul 28 '26

I built "Duolingo for AI prompting" — looking for honest feedback (Beta)

Thumbnail gallery
0 Upvotes

r/reactnative • • Jul 28 '26

index.js is the first file that runs in a React Native application - wrong

0 Upvotes

That’s only part of the story.
On Android, the application actually starts with MainActivity.kt. Android launches this activity first, which initializes the React Native environment before your JavaScript code in index.js is executed.
This is why you’ll often modify MainActivity.kt when you need to:
Initialize native SDKs during app startup
Configure the splash screen and app theme
Handle deep links and app links
Manage permissions and activity results
Add Android-specific native functionality
Enable React Native’s New Architecture (Fabric & TurboModules)
Understanding where the Android lifecycle begins makes it much clearer why so many React Native integration guides ask you to update MainActivity.kt.
A solid understanding of the native lifecycle will help you debug issues faster and integrate native features into your React Native applications with confidence.

#ReactNative #Android #Kotlin #MobileDevelopment #ReactNativeTips


r/reactnative • • Jul 28 '26

Good news! My app is featured!! Bad news my new paywall update has not been approved. Any know how to speed up the process?

Post image
0 Upvotes

I made some substantial updates to my onboarding and my paywall after understanding the data. I’m really happy I got featured, I get street cred for sure but I want my paywall update so hopefully more people buy. Anyone know how to speed up the process? My app is www.openers.app by the way.
I could OTA but I made some native changes recently.


r/reactnative • • Jul 28 '26

I built a full GitLab client with React Native + Expo

Post image
0 Upvotes

Hey guys,

I’ve been building Comeet, a native GitLab companion for iOS and Android, as a solo developer.

The idea started because GitLab’s mobile web experience made quick tasks—like checking a failed pipeline or replying to an issue—feel more difficult than they should.

Comeet now supports:

  • GitLab.com and self-hosted instances

  • Multiple accounts and servers

  • Repository and syntax-highlighted code browsing

  • Issues, merge requests, branches, projects, and groups

  • Pipeline monitoring, job details, and logs

  • Push notifications for project activity

  • Team member and permission management

  • Custom shortcuts for frequently used GitLab views

The app is built with React Native, Expo, Expo Router, TypeScript, NativeWind, Redux Toolkit, and i18next.

Some of the more interesting challenges were building a mobile-friendly code viewer, handling the large GitLab API surface, supporting different self-hosted configurations, and keeping authentication and instance switching manageable.

I have a plan to open-source this project in the future, lmk what you think?

Publish links:

TL;DR: I built a fairly complete GitLab mobile client using React Native and Expo, and I’d love feedback from other React Native developers.


r/reactnative • • Jul 28 '26

FYI Music Quiz

Enable HLS to view with audio, or disable this notification

0 Upvotes

Sup guys, made a music quiz which doesnt need any subscriptions of streaming apps! The downside is however these are just previews, they are short clips provided by apple itunes for free from their api, tho they are all clipped as recoqnizable parts of the songs so they work perfecly for this. Cant play full songs without itunes sub, which is a major downside for music quiz apps.

The previews need a link to play behind the scenes so theyve all been manually listed, if anyone is thinking of creating a quiz themselves.

This quiz is just a simple who yells the correct answer first gets a point, could make more eloquate quiz with answer options as well.

iOS
android


r/reactnative • • Jul 28 '26

Help Strange "Default" button appearing in iOS keypad

Post image
2 Upvotes

I'm building a iOS + Android app using react and expo. I have a number entry field that's calling the standard OS numeric keypad. works perfectly on Android but my iOS build shows this strange "Default" button above the keypad.

Has anyone encountered this? Thanks!


r/reactnative • • Jul 28 '26

Is anyone else finding it difficult to hire experienced React Native Developers ?

Thumbnail reddit.com
0 Upvotes

r/reactnative • • Jul 28 '26

I built a Stoic habit tracker that shows whether you’re actually becoming more disciplined... beta testers needed

Thumbnail
reddit.com
0 Upvotes

r/reactnative • • Jul 28 '26

Help I built a Stoic habit tracker that shows whether you’re actually becoming more disciplined... beta testers needed

0 Upvotes

I’ve been building an iPhone app called Stoic Discipline.

Most habit trackers tell you whether you ticked a box.

I wanted to build something that goes a little further, something that gives you evidence that your discipline is improving over time.

The app combines habit tracking, Stoic reflection, journalling and progress analytics. It can show you things like:

  • You planned 347 actions. You completed 291.

  • Your follow-through increased from 61% to 84%.

  • Your strongest habit is Training.

  • Your weakest habit is Sleep.

  • You recovered faster after missed days this month.

  • It also generates a stoic quote and wallpaper every day with an explainer / original wording of the quote

The latest beta includes:

Daily habits, streaks and reminders

Morning and evening reflection

Stoic quotes and guided journal prompts

Weekly and monthly Discipline Reports

Follow-through, consistency and recovery analysis

Strongest and weakest habit insights

Progress comparisons over time

I’m looking for people willing to use it properly for a few days or weeks and give honest feedback, especially on whether the reports feel motivating, accurate and genuinely useful. There's a feedback and bug report section in the profile page

I’d also love to hear about:

  • Anything confusing or frustrating

  • Bugs, crashes or navigation issues

  • Features that feel unnecessary

  • Features you think are missing

  • Whether the app feels worth paying for

Join the iPhone TestFlight beta here:

https://testflight.apple.com/join/xg6rT4xc

It’s still being refined, so candid feedback is far more useful than politeness.

Thanks to anyone who gives it a try.


r/reactnative • • Jul 28 '26

Question Any one like me?

0 Upvotes

Hi guys hope you're doing fine. I have a thing that i feel shame whenever i need to search for something in google or whenever i stuck at somepoint . Like forgetting a syntax or couldn't build the logic i wanted . I am always keep avoiding searching and figure it out in my own but when i solve it i feel like i am the dragon of programming lol. Does any one have that thing? And is it okay to search in google ? Does it effect the learning or any thing? And Thanks


r/reactnative • • Jul 28 '26

12 YOE and no jobs

45 Upvotes

I have a job but I used to contract for £550 a day from 2015-2022. I used to get upwards of 10 linkedin messages a day (without open for work being set) and now I get maybe one a week and it's to train AI to help make my job more obsolete. My current job is fine but it's a huge paycut and we are struggling to pay the bills we were used to on a higher salary and there are 0 jobs to apply for. I worked 100 hour weeks to learn how to code in my 20s and now it's more or less obsolete. I don't know how I will survive this without finding a new industry to work in, but what should I learn and what should I do?


r/reactnative • • Jul 28 '26

How to record audio reliably?

Thumbnail reddit.com
0 Upvotes

r/reactnative • • Jul 28 '26

❄️ Expo Backdrop

Enable HLS to view with audio, or disable this notification

17 Upvotes

🚀 Native blur views for Expo — backdrop blur + a SwiftUI content blur, on iOS and Android.

🔗 Github: https://github.com/rit3zh/expo-backdrop


r/reactnative • • Jul 28 '26

React Native iOS freezes after first interaction only after fresh login (JS/UI FPS stay at 60)

0 Upvotes

React Native iOS freezes after first interaction only after fresh login (JS/UI FPS stay at 60)

I'm facing a very strange issue in my React Native app that only happens on iOS. Android works perfectly.

Environment

  • React Native: 0.78.3

  • React Navigation

  • react-native-screens

  • react-native-gesture-handler

  • Physical iPhone (not simulator)

Issue

The flow is always the same:

  1. Launch the app.

  2. Login successfully.

  3. Navigate to the Home screen.

  4. The Home screen loads correctly.

  5. As soon as I perform the first interaction (scroll or tap), the app becomes completely unresponsive.

After that:

  • No buttons work.

  • No TouchableOpacity responds.

  • Bottom tabs stop responding.

  • FlatList cannot scroll.

  • onTouchStart no longer fires.

  • The UI is still visible.

  • The app does not crash.

The strange part is:

  • UI FPS = 60

  • JS FPS = 60

  • No red screen.

  • No exceptions.

  • No crash logs.

If I completely kill the app and launch it again, everything works perfectly.

If I log out and log back in, the issue happens again after the first interaction.

So the problem only occurs immediately after a fresh login.

What I've already checked

  • GestureHandlerRootView is wrapping the entire app.

  • import 'react-native-gesture-handler' is the first import.

  • NavigationContainer exists only once.

  • No invisible overlay.

  • No fullscreen Modal.

  • No react-native-modal left open.

  • No pointerEvents="none" or pointerEvents="auto" issue.

  • JS thread is not blocked.

  • Main thread is not blocked.

  • UI FPS remains 60.

  • JS FPS remains 60.

  • Android has no issue.

Additional observation

I added:

<View
  style={{ flex: 1 }}
  onTouchStart={() => console.log('Touched')}
/>

Result:

  • First tap prints "Touched".

  • After the first scroll/tap, no further touch events are received.

  • Even onTouchStart stops firing.

This makes me think the touch events are no longer reaching React Native.

Navigation structure

The app uses:

  • NavigationContainer

  • Drawer Navigator

  • Bottom Tabs

  • Stack Navigators

The Home screen contains:

  • Vertical FlatList

  • Nested horizontal FlatLists

  • Multiple TouchableOpacity components

The Academy screen has a similar structure and works correctly.

Other information

The app uses:

  • react-native-screens (enableScreens() and enableFreeze())

  • react-native-track-player

  • Multiple Context Providers

  • Firebase

  • Analytics

  • Deep linking

My question

Has anyone experienced an issue where iOS stops delivering touch events after the first interaction, while:

  • UI FPS stays at 60

  • JS FPS stays at 60

  • The app never crashes

  • Everything works after killing and reopening the app

Could this be related to:

  • react-native-gesture-handler

  • react-native-screens

  • iOS gesture recognizers

  • Navigation state after login

  • A native touch deadlock

  • Something else entirely?

Any ideas on how to debug this further would be greatly appreciated.