React Native and Expo vs React PWA/Web and related topics - Detailed exchange with ChatGPT

Last updated on 1 Sep. 2025

Mainly on 25 Aug. 2025, I had a long session with ChatGPT on React Native and Expo vs. React PWA vs. React Web vs. PHP and more. [I later renamed the chat to "React Native and Expo vs React PWA/Web".] Note that when I say “React Native and Expo”, I mean using React Native together with Expo’s universal runtime to build apps that run on Android, iOS, and the Web.

This post has section summaries of the chat which itself is longish. The slightly edited version of the whole chat is saved as this 124 pages document:
The section names in the document are deliberately long to give a clearer idea of what the sections contain. Those section names are given below followed by the section summaries.
  1. Introduction
  2. React Native & Expo vs React PWA vs React Web
  3. Education Apps: Recommended Tech Stack; Tech Stacks used by Khan Academy, Duolingo, Moodle
  4. Web app support in React Native through react-native-web and Expo
  5. React PWA/Web on mobile runs in browser engine (WebView) and so is slower than Native UI
  6. DOM is expensive vs Native View which is leaner
  7. Virtualization libraries in React (Web) to tackle DOM reflow/scrolling problem for large lists
  8. Definition of “native” and its variations (e.g. pure native, near native) for mobile and desktop
  9. Core value proposition of React Native: One codebase for two major mobile platforms (Android/iOS)
  10. React Native animations are usually faster than React PWA/Web animations on mobile (GPU-accelerated vs CPU-bound animations)
  11. Gesture handling efficiency and development effort on mobile: React Native vs React PWA/Web
  12. App target audience (mobile-first or web-first) helps decide suitable tech stack - React Native or React PWA/Web
  13. [Perhaps outdated] Twitter Lite (PWA) vs Twitter Native apps (iOS/Android)
  14. React PWA/Web goes through more layers than Native for UI interactions on mobile
  15. User/stakeholder expectations issue when promoting React PWA/Web app as "mobile + web" or even as "web + mobile" app
  16. For React Native and Expo app (mobile + web), Web app can presume minimum tablet width (~780px)
  17. React PWA/Web app that does not handle mobile portrait width should not claim to be usable in mobile browser
  18. For content-heavy apps that have to handle mobile portrait width, React Native and Expo may be better than React PWA/Web
  19. Safe Expectations Language for React Native & Expo app, and for React PWA/Web app
=================================
=================================

Section Summaries

Note: The tables below have been copy-pasted from the Word document mentioned above. That seems to have resulted in paragraph tag being applied to each column of table resulting in excess vertical spacing between table rows. I fixed that for the first table below but that required lot of manual work of changing paragraph style to normal for each table cell. HTML editing did not give an easy solution. So I have done this fix only for the first table below.

1. Introduction

Summary not needed.
======================================================================

2. React Native & Expo vs React PWA vs React Web

Feature
Expo / React Native
React PWA
React Web (non-PWA)
Codebase
One JS/TS codebase → iOS + Android + Web
One JS/TS codebase → Web-first, can feel mobile-like
One JS/TS codebase → Web-only
UI Rendering
Native components (fast, GPU-accelerated)
DOM + CSS
DOM + CSS
JS Engine
Hermes / JSC / V8 (bundled)
Browser JS engine (V8, JSC, SpiderMonkey)
Same as PWA (browser JS engine)
Performance
Near-native smoothness, esp. animations & lists
Good, but DOM overhead can lag
Good, but DOM overhead can lag
Offline Support
Full (AsyncStorage, SQLite, File APIs)
Service workers (cache pages & assets)
None by default (online-only)
Background Work
Full background tasks (GPS, sensors, downloads)
Limited (service worker tasks only)
None
Device APIs
Full native APIs (camera, GPS, Bluetooth, NFC, biometrics, etc.)
Some APIs (Camera, GPS, Web NFC/Bluetooth, etc. — Android stronger than iOS)
Very limited (basics: camera, GPS)
Push Notifications
Native push notifications (Android + iOS)
Push supported on Android; weak on iOS
None
Distribution
App Stores + Web (via Expo Web)
Browser install prompt; optional wrappers for app stores
Standard website via URL
Discoverability
App Stores + optional web URL
Web URL + SEO + "Add to Home Screen"
Web URL + SEO
App Size
Larger (bundled JS engine + native runtime)
Smaller (browser provides runtime)
Smallest
Best Use Case
Feature-rich apps, needs deep device integration
Lightweight apps that should work offline and feel app-like
Standard websites/web apps with no offline or mobile app ambitions

️ Quick takeaways:

  • Expo/React Native = Best if you want a true mobile app (deep device access, app stores).
  • React PWA = Best if you want a web app that feels mobile-like (offline, installable, limited device APIs).
  • React Web (non-PWA) = Best for classic websites/apps where offline/app-like features don’t matter.
======================================================================

3. Education Apps: Recommended Tech Stack; Tech Stacks used by Khan Academy, Duolingo, Moodle

High-Level Comparison

Platform

Web App Codebase

Mobile App Codebase

UI Stack Details

Moodle

PHP-based LMS (web)

Ionic/Angular hybrid app (TypeScript)

Completely separate; wrappers via web services

Khan Academy

React (web)

React Native (mobile)

Separate, but both React-based

Duolingo

React + TypeScript (web)

React Native (mobile)

Separate UI codebases, shared logic


Summary

  • Moodle uses entirely separate technology stacks for its web and mobile experiences—PHP for web, Ionic+Angular hybrid for mobile. These are not unified or share code beyond API/logic.
  • Khan Academy and Duolingo each maintain distinct UI codebases (React → web, React Native → mobile), but both are built on the same overarching React ecosystem, allowing more synergy and potentially shared code (business logic, components where abstracted).

️ Disadvantages of Moodle’s PHP Web App (compared to React-based web apps)

Aspect

Moodle (PHP web)

Khan Academy / Duolingo (React web)

Rendering

Server-side HTML reloads

SPA/SSR with React → smoother

Interactivity

Limited, older JS/jQuery style

Modern, rich UIs with React components

Code Reuse

None (PHP vs Ionic mobile)

Partial reuse (React web vs RN mobile)

Performance

Slower navigation, heavy reloads

Snappy, app-like navigation

Developer Ecosystem

PHP + custom Moodle stack

React + massive modern ecosystem

UX

Functional but dated

Polished, engaging, modern


️ Bottom line:
Moodle’s PHP legacy makes it solid and reliable for LMS functionality, but it lags behind React-based apps in interactivity, performance, UI polish, and developer friendliness. Khan Academy and Duolingo are positioned more like modern consumer apps, while Moodle feels more like a classic enterprise platform.

======================================================================

4. Web app support in React Native through react-native-web and Expo

🔹 Summary Relationship

  • React Native core: mobile-first (iOS + Android).
  • react-native-web: an adapter library that makes React Native components run in the browser.
  • Expo: a toolchain that integrates React Native + react-native-web + bundling so you can run one project on iOS, Android, and Web with minimal config.
======================================================================

5. React PWA/Web on mobile runs in browser engine (WebView) and so is slower than Native UI

🔹 1. Where the Code Runs

Stack

JS Execution

UI Rendering

React Native (with Hermes/JSCore)

JS runs in a JS engine bundled inside the app (Hermes/JavaScriptCore). Runs directly in process, optimized.

UI instructions go through the native rendering pipeline (UIKit on iOS, Views on Android). You’re drawing real native buttons, lists, animations.

Expo (using RN)

Same as above, but Expo bundles Hermes/JSCore + a managed runtime.

Same native rendering as RN.

PWA (in mobile browser or standalone install)

JS runs inside the browser’s JS engine (V8 in Chrome, JavaScriptCore in Safari). Similar raw JS performance to RN.

UI rendering happens via DOM + CSS + browser layout engine (WebKit/Blink). Not native widgets, but emulations styled with HTML/CSS.

👉 JS speed is similar, because both use modern engines (Hermes vs V8 vs JSC).
👉 UI performance is the key difference.


🔹 2. Why UI is Slower in PWAs

  • DOM is expensive
    The browser DOM is tree-based, recalculating layout + style + paint on changes. Animations, gestures, and large lists cause frequent reflows → jank.
  • Native views are leaner
    React Native directly tells iOS/Android: “render a native <TextInput> here.” That widget is already optimized in C/Obj-C/Java.
  • GPU acceleration
    Native animations often use the GPU directly. Browser animations can be GPU-accelerated (CSS transforms), but complex React/JS-driven animations often stay on CPU.
  • Bridging differences
    RN bridges JS → native UI efficiently. PWA bridges JS → DOM → browser engine → OS drawing. More layers = more latency.
======================================================================

6. DOM is expensive vs Native View which is leaner

🔹 In a real-world mobile browser app (React PWA)

  • You’ve got 4,000 chat rows, each with:
    • Text (variable height due to wrapping, emoji size differences)
    • Inline images (may load late, resizing layout)
    • CSS styles (margins, padding, flexbox, percentages, etc.)
  • When the user scrolls just one row down:
    • The browser must recompute layout and style for all 4,000 rows to know where each sits in the flow.
    • This process is called reflow (layout pass).
    • Even if only ~12 are visible, Chrome doesn’t “forget” the other 3,988 — they all live in the DOM and must be tracked.

That’s why scrolling can “jank” (drop below 60fps) in heavy web UIs on mobile.


🔹 In a React Native app (FlatList)

  • Only ~12 rows (visible + buffer) exist in memory.
  • When you scroll by 1 row:
    • FlatList recycles an old row view (moves it to bottom, assigns new data).
    • The layout system never touches 4,000 items — it only deals with those ~12.

So no massive reflow penalty.
Smooth 60fps scrolling even with 10k+ items.

======================================================================

7. Virtualization libraries in React (Web) to tackle DOM reflow/scrolling problem for large lists

🔹 Virtualization in React (Web)

The idea:
Instead of creating all 4,000 <div>s in the DOM, you only render the ~12–20 that are visible in the viewport, plus a small buffer. As you scroll, the component recycles DOM nodes, updating their content.

This makes the web behave more like React Native’s FlatList.


 Popular Virtualization Libraries

  1. react-window (lighter, modern, recommended)
  2. react-virtualized (older, feature-rich, heavier)
  3. TanStack Virtual (modern, very performant, headless)

        🔹 How This Helps

        • With virtualization, scrolling through 4,000 chat rows means:
          • DOM has only ~20 rows, not 4,000.
          • Browser does layout & style calculations only for those ~20.
          • Memory footprint stays tiny.
          • Jank goes away (if implementation is good).

        So it bridges the gap between web DOM and native FlatList.


        🔹 Limitations

        • Dynamic heights (chat with long vs short messages, images loading late) make virtualization tricky.
          • Libraries often require “measuring” row heights.
          • If you don’t measure, you get jumpy scrollbars.
        • SEO issues (if list is part of content).
        • More dev effort than just dumping 4,000 divs.

        📌 Bottom line:
        Virtualization libraries on React Web can make a PWA chat app with 4,000 messages perform almost as smoothly as React Native’s FlatList. But the effort and complexity to handle dynamic content is much higher on web.


        Comparision between simple (Naïve) and virtualized rendering of 4,000 messages with 20 messages visible on screen for browser (PC and mobile)

        Aspect

        Naïve (4000 nodes)

        Virtualized (20–40 nodes)

        Initial Render

        150–300ms

        20–40ms

        Scroll FPS

        30–45 fps (stuttery)

        55–60 fps (smooth)

        Memory Footprint

        50–100 MB

        5–10 MB

        Reflow Workload

        4000 nodes each tick

        20–40 nodes each tick

        User Experience

        Noticeable lag

        Native-like scrolling


        👉 That’s why Slack, Discord, Facebook, Notion, Twitter/X all rely on windowed lists (often react-window or custom virtualization). Without it, their apps would crawl once you hit a few thousand items.


         So yes — virtualization is a must for both PC browsers and mobile browsers, not just a “mobile-only optimization.”

        📊 Quick Comparison between React Native FlatList and React Web Virtualized List

        Aspect

        React Native FlatList

        React Web Virtualized List

        Initial Render

        15–30ms (very fast)

        20–40ms (fast, but DOM overhead)

        Scrolling FPS

        55–60 fps (smooth)

        50–60 fps (can micro-jank)

        Memory Usage

        ~20 items in RAM

        ~20 DOM nodes (heavier)

        Complex Items

        Efficient (native layout)

        Browser may struggle

        APIs

        Built-in, powerful props

        Needs external lib (react-window etc.)


        🔑 Key Insight

        • React Native FlatList is built-in and deeply optimized for mobile. It knows about touch handling, gesture physics, item recycling at the OS level.
        • React Web Virtualized List is an add-on, and while it works very well, it’s limited by the browser DOM + CSS engine overhead.

        So:

        • For mobile apps → React Native FlatList is the clear winner.
        • For web apps → virtualization is still necessary, but won’t ever be quite as smooth as native list rendering.

        👉 That’s why apps like WhatsApp use React Native FlatList on mobile, but a virtualized React list on WhatsApp Web.

        ======================================================================

        8. Definition of “native” and its variations (e.g. pure native, near native) for mobile and desktop

        📖 Standard Industry Definition

        • “Native” usually means:
          1. Built with the platform’s official SDK and language (e.g. Swift/Obj-C for iOS, Kotlin/Java for Android, C#/XAML for Windows).
          2. Runs directly on the device without a runtime abstraction layer like a browser.
          3. Uses native performance optimizations and has direct access to all device APIs.
        • Example from Apple docs: “A native app is an app written using the iOS SDK that runs directly on iOS devices.”
        • Example from Google: “Native Android apps are built with Android SDK tools and APIs.” 

        So where does React Native sit?

        • Pure Native App (Java/Kotlin on Android, Swift on iOS):
           No JS engine,  No bridge.
        • React Native App:
           JS engine,  bridge overhead, but
           Still renders true native UI components (not WebView, not DOM).
        • Hybrid App (Cordova/Ionic, PWA, etc.):
           Runs in WebView,  UI = HTML/CSS,  No native widgets.
          Much farther from native.

        So, RN is often described as:
        👉 “Near-native” / “Native UI with JS bridge”.
        Not strictly native, but much closer to native than Web/PWA.


        📊 Execution + UI Rendering Comparison

        Aspect

        Native App (Java/Kotlin, Swift)

        React Native App (JS + Native Bridge)

        PWA / Hybrid App (React Web, Cordova, Ionic)

        Execution Environment

        Runs directly on device OS (Dalvik/ART on Android, Objective-C/Swift runtime on iOS). No extra runtime.

        JS code runs inside JS engine (Hermes, JSC, V8). Communicates with native side via bridge (old) or JSI/Fabric (new arch).

        Runs inside WebView (or mobile browser). Execution = Browser JS engine (V8 on Chrome, Nitro on Safari).

        UI Rendering

        Uses true native widgets (e.g. android.widget.Button, UIKit UIButton). Drawn by OS directly.

        Renders true native widgets, but instructions come from JS via bridge. Example: <Button /> → JS sends props to OS → OS creates native Button.

        UI = DOM + CSS inside a WebView. Elements are not native; they are browser-rendered.

        Bridge/Abstraction Layer

        None (direct API calls).

        Yes (JS ↔ Native Bridge). New Fabric/JSI reduces overhead.

        WebView sandbox = isolation layer. All device API calls go through browser or plugins (e.g. Capacitor).

        Performance

        🚀 Fastest — direct execution & native UI.

         Near-native — some overhead due to JS engine + bridge. Still very fast for UI-heavy apps.

        🐢 Slower — DOM, CSS layout, and WebView overhead. Performance gap is big for animations/complex UIs.

        Device API Access

        Full access (camera, sensors, storage, etc.).

        Near-full access (through native modules, community packages, or custom bridges).

        Limited. Many APIs available on Android (via Service Workers, Web APIs), but iOS Safari restricts many (push, Bluetooth, background tasks).

        App Store Distribution

         Fully supported.

         Fully supported.

         Not directly — must be wrapped with Capacitor/Cordova to publish as an app.

        Offline Support

        Handled via SQLite, files, etc.

        Same as Native.

        Via Service Workers + browser cache. Works, but with limits (e.g. large files).


        🔑 Takeaways

        • Native = fastest, no indirection.
        • React Native = real native UI, but controlled by JS + bridge → slightly slower, but way more developer productivity (cross-platform).
        • PWA = lowest performance tier for UI, since it’s browser-based (DOM/WebView). Great for reach & simplicity, not for performance-critical apps.

        ======================================================================

        9. Core value proposition of React Native: One codebase for two major mobile platforms (Android/iOS)

        The core value proposition of React Native:

        1. One codebase → two major mobile platforms
          • You write the bulk of your app once, in React Native (JavaScript/TypeScript).
          • Only small platform-specific pieces (like native modules or special UI tweaks) need separate code for Android/iOS.
          • This drastically reduces dev effort and maintenance.
        2. UI is still native
          • Unlike PWAs or Cordova apps, RN doesn’t render in a WebView.
          • Components like <Button>, <TextInput>, <ScrollView> map to real Android/iOS UI elements.
          • So, the “look & feel” is indistinguishable from fully native apps.
        3. Performance is “good enough” for 90%+ of apps
          • Pure native apps (Kotlin/Swift) will always win in raw speed (no JS engine, no bridge).
          • But React Native is close enough for most use cases, even in production-scale apps like Facebook, Instagram, Shopify, Discord, etc.
          • Only in very performance-sensitive domains (heavy 3D, gaming, AR/VR) does React Native fall short → those are usually built in native or Unity.

        Note: Unity is a cross-platform game engine.

        ======================================================================

        10. React Native animations are usually faster than React PWA/Web animations on mobile (GPU-accelerated vs CPU-bound animations)

        React/JS animations in PWAs vs React Native animations

        • Many React animation libs (Framer Motion, React Spring) end up modifying styles like top/left/height/width or doing manual frame updates with JS.
        • Unless carefully optimized, they stay CPU-bound.
        • In contrast, React Native animations (via Animated API or Reanimated) often run directly on the native UI thread, mapping to GPU-friendly operations (like Core Animation on iOS, or Android’s RenderThread).

        • React Native: animation logic can run outside JS, directly on the native compositor/GPU. Performance ≈ like a native Kotlin/Swift app.
        • PWA/React Web:
          • If you stick to CSS transforms → can still be GPU accelerated.
          • But if animations involve layout/paint (width, height, top, left, shadows, borders, etc.), they run on CPU → more stutter, especially on mobile.

        ️ So the real difference is:

        • Web/PWA: You can get GPU animations, but you must be very disciplined (only transforms/opacity, minimal JS involvement). Many JS-heavy React animation libs break this and stay on the CPU path.
        • React Native: Animation APIs are designed with GPU handoff as the default best practice → so you’re less likely to “accidentally” block the GPU path.

        👉 In short: You nailed it — the problem on web is that many animation libs run in JS and mutate DOM styles, while React Native’s ecosystem is tuned to make GPU-native animations the norm.

        ======================================================================

        11. Gesture handling efficiency and development effort on mobile: React Native vs React PWA/Web

        🔹 Why Gestures + Animations Are Different

           1. PWA (React Web in browser)

        • Event pipeline:
          Finger touches → OS touch system → browser engine → JS thread → your handler (React/Vanilla).
        • Your code (onTouchMove, onScroll, pointermove, etc.) runs on the main JS thread.
        • If JS is busy (network parsing, JSON processing, React re-render), gesture events lag.
        • Animation triggered by gestures is also JS-driven most of the time → stutters.
        • Browser doesn’t let you run logic on compositor/GPU thread (except for very limited CSS scroll/transform animations).
          → Example: You can say “swipe = transition left 100px,” but you cannot do complex physics like “bounce with spring stiffness” without JS involvement.

        Result: PWAs handle simple flick/scroll fine (browser scroll is native!), but custom gestures (drag cards, physics, pinch-to-zoom) easily lag.


            2. React Native

        • Event pipeline:
          Finger touches → OS touch system → directly captured by native gesture handler (UI thread) → mapped to React Native’s UI manager → animations run with Reanimated or Gesture Handler libraries, often off the JS thread.
        • Gesture + Animation both live on UI thread.
          Example: dragging a card horizontally = position updates are applied directly in GPU/compositor thread.
        • Even if JS thread is blocked (network request, state updates), the gesture-driven animation stays buttery smooth.
        • Reanimated allows complex physics (springs, decay, inertia) computed outside JS.

        Result: React Native can deliver native-like interactions such as:

        • swipe-to-dismiss with physics,
        • pinch-to-zoom images,
        • drag-and-drop lists,
          without stutter.

         Big Picture

        • PWA: Good for basic taps, scrolls (handled natively by browser), simple CSS transforms. Custom gestures = lag-prone.
        • React Native: Native gesture system + GPU-thread animation → allows fluid, physics-rich, complex interactions.

        That’s why apps like Instagram / WhatsApp feel smooth when dragging/swiping images or stories — they use native APIs, not browser touch events.



        2️ Side-by-Side Gesture Capability Table

        Here’s the quick comparison:

        Gesture

        Web (PWA) in React

        React Native

        Tap / Click

         Native support (onClick, onTouchStart)

         Native support (Pressable, TouchableOpacity)

        Double Tap

        ️ Manual logic (time diff between taps)

         Built-in gesture recognizer

        Long Press

        ️ Manual timer (setTimeout on touchstart)

         Native gesture handler

        Drag / Pan

         Via touchmove or Pointer Events

         Native pan recognizer, smoother

        Swipe

        ️ Manual velocity detection

         Built-in swipe recognizer (velocity, direction)

        Pinch / Zoom

        ️ Manual math with touches[]

         Built-in PinchGestureHandler

        Rotate (2-finger twist)

        ️ Manual math (angle calc)

         Built-in rotate gesture recognizer

        Fling / Momentum

        ️ Manual coding (velocity, inertia simulation)

         Native inertia + deceleration physics

        Chained Gestures (e.g. swipe → hold → rotate)

         Very hard to implement manually

         Fully supported via gesture-handler states

        Multi-finger (3+, 4-finger swipe etc.)

         Mostly not exposed

         Exposed by OS (if device supports)


        🔑 Insights:

        • Web = low-level primitives only → you build gestures yourself (JS math, timers).
        • React Native = high-level gesture recognizers → OS tracks velocity, direction, inertia, etc. for you.

        So in PWAs, gestures work but are often less smooth (all on main JS thread), while in RN they’re buttery because OS + UI thread handle them.


        ======================================================================

        12. App target audience (mobile-first or web-first) helps decide suitable tech stack - React Native or React PWA/Web

        📝 Checklist: PWA vs React Native

         Choose PWA if:

        • Your app is web-first (dashboards, knowledge bases, forms, lightweight utilities).
        • Gestures = basic (tap, scroll, maybe drag).
        • Offline support is nice-to-have, not critical.
        • App store presence is not a priority (distribution mainly via a URL).
        • Your audience is mostly desktop/laptop, mobile is secondary.
        • You need fast launch, minimal budget.

        Examples: Admin portals, blogs, e-commerce catalogs, ticket booking, internal tools.


         Choose React Native (Expo) if:

        • You will market the app as “mobile-first” or “mobile app”.
        • Users expect standard mobile gestures (swipe-to-dismiss, pull-to-refresh, pinch-to-zoom).
        • Performance & polish matter for user reviews (consumer apps, chat, games, media apps).
        • You need offline-first reliability (e.g., a notes app, fitness tracker).
        • App store presence (Google Play / App Store) is important for discovery or trust.
        • Long-term: you anticipate adding mobile-specific features (push notifications, background sync, native APIs).

        Examples: Social apps, finance apps, health/fitness, productivity, chat, consumer-facing apps in general.

        ======================================================================

        13. [Perhaps outdated] Twitter Lite (PWA) vs Twitter Native apps (iOS/Android)

        Omitted.

        ======================================================================

        14. React PWA/Web goes through more layers than Native for UI interactions on mobile

        React Native vs PWA Architecture

        Aspect

        React Native

        React PWA (Mobile)

        JS Bridge

        JS ↔ Native UI via UI Manager / Native Modules

        JS ↔ DOM ↔ Browser Engine ↔ OS Drawing

        Rendering

        Native views are drawn directly by OS / GPU

        DOM elements drawn by browser engine (Chromium/Safari/WebKit)

        Layers

        1 bridge (JS ↔ Native)

        2+ layers (JS ↔ DOM ↔ Browser ↔ OS)

        So React Native can manipulate native UI directly; PWA must go through the browser sandbox.


        Why PWA Can’t Shortcut JS → Native UI

        a) Browser security sandbox

        • Browsers intentionally isolate web content from OS APIs.
        • Allowing a web page to directly call OS drawing APIs would be a huge security risk (malicious code could read/write system memory, access other apps, inject gestures, etc.).
        • All web rendering happens inside the browser engine; the OS itself is abstracted away.

        b) No standard cross-browser API

        • Each browser (Chrome, Safari, Edge) implements its own rendering engine.
        • Even if React PWA tried to “map JS to native UI,” there is no universal way to do it across browsers.
        • You’d need browser vendors to expose a standardized JS → native UI API, which doesn’t exist.

        c) Web architecture constraints

        • Browser rendering is asynchronous, optimized for DOM, CSS, JS separation.
        • You cannot bypass the DOM/compositor pipeline for arbitrary JS UI updates.
        • CSS transforms can be GPU-accelerated, but for everything else, the browser must recompute layout/style/paint.

        d) Limited gesture & animation control

        • OS-native gesture detection and animation engines are not exposed to the browser.
        • All JS → DOM → browser → OS paths have latency; you cannot attach JS directly to GPU rendering in a fully general way.

        Why React Native Can Do It

        • React Native ships a JS runtime + bridge that talks to native components directly.
        • Gesture events, animations, layout calculations are exposed by OS.
        • JS thread updates properties, native UI updates on UI thread or GPU thread, giving near-native performance.
        • This is possible because React Native runs outside the security sandbox of a browser, in a controlled app environment.

         Key Insight

        • The limitation in PWA is not a failure of React or JavaScript, but fundamental browser design: security sandbox + abstracted rendering engine + no standardized JS → native UI API.
        • That’s why no PWA, library, or clever JS trick can fully emulate the direct JS ↔ native UI bridge that React Native provides.
        ======================================================================

        15. User/stakeholder expectations issue when promoting React PWA/Web app as "mobile + web" or even as "web + mobile" app

        👏 You’ve put your finger on a really practical product-management truth here. Let me echo and sharpen it:
        • If an app is advertised as “web + mobile”mobile dominates. In 2025 India (and most of the world outside North America/Europe), mobile is the primary internet. Desktop/PC is a minority, sometimes a tiny minority.
        • So yes: if you promise mobile, stakeholders expect mobile-first UX → smooth gestures, offline, push notifications, camera/mic integration, native feel. A PWA, no matter how polished, often falls short here.
        • That means:
          • Saying “web and mobile” but only delivering a React PWA is setting up investor disappointment.
          • Saying “web-first desktop app” (with mobile web fallback) sets correct expectations.
          • Saying “native app (with web support)” also sets correct expectations.
        This is less a technical issue and more a communication + positioning issue — but it has huge technical consequences (because the tech stack has to back the promise).
        ...
        Here’s a simple expectations map you can use:

        🔹 If you ship React PWA

        • Say: “This is a web-first app that works on desktop and can also be opened on mobile browsers.”
        • Don’t say: “mobile app”.
        • If pressed, you can add: “It runs on mobile browsers, but it’s not designed to replace native mobile apps.”

        🔹 If you ship React Native (Expo)

        • Say: “This is a mobile app, available on iOS and Android, with a web version too.”
        • Here, expectations are mobile-first — which you can satisfy.

        This way:

        • Nobody feels misled.
        • If you later need to “upgrade” from PWA to React Native, you can frame it as: “We started web-first, now we’re giving mobile users the full native experience.”
        ======================================================================

        16. For React Native and Expo app (mobile + web), Web app can presume minimum tablet width (~780px)

        How Gmail handles it (insightful example)
        • Desktop web: Gmail assumes a minimum of ~780px window width for full content visibility.
          • Below that, content may clip, but Gmail does not enforce horizontal scrolling.
          • This is because Gmail expects mobile users to use their native app.
        • Mobile app: React Native-like experience, content wraps properly, gestures and touch handling are fully mobile-native.

        Recommended approach for RN + Expo app

         Web screen (desktop/laptop primarily)

        • It’s reasonable to set a minimum width (e.g., 780px or 800px) below which your layout may clip.
        • You can optionally show a subtle message for extreme narrow widths (e.g., “We recommend using the mobile app for smaller screens”), but it’s not mandatory.
        • Don’t spend excessive effort making the web layout wrap perfectly for mobile portrait — that’s now the native mobile app’s responsibility.

         Mobile screen

        • Content automatically handled by React Native components on phones/tablets.
        • You don’t need separate responsive code for mobile portrait on web.
        • The Expo mobile app will handle wrapping, gestures, touch scrolling, etc.

        Best practice summary

        Aspect

        Guidance

        Web width ≥ 780px

        Layout designed for desktop/laptop → full feature access

        Web width < 780px

        Content may clip; optionally show message → “Use mobile app for better experience”

        Mobile devices

        Use React Native app → handles portrait/landscape wrapping, gestures, animations

        Effort allocation

        Focus responsive design on desktop widths only for web; mobile width handling is covered by native app

         Key insight: You’re essentially offloading small-width UX responsibility to the mobile app, just like Gmail does. This is accepted practice for mobile-first + web-also apps.

        ...
        Many responsive frameworks (Bootstrap, Material-UI) set breakpoints around 768px–800px for tablet/desktop switching. Gmail’s choice of 780px matches this general convention.

        ======================================================================

          17. React PWA/Web app that does not handle mobile portrait width should not claim to be usable in mobile browser

          For a React PWA that is advertised as usable on mobile browsers (and there is no native mobile app), the expectations shift:

          Web-first PWA with mobile usage

          • Mobile portrait width must be fully supported:
            • Content should wrap appropriately.
            • Layout should reflow to fit narrow screens without requiring horizontal scrolling.
            • Touch targets (buttons, links) must be large enough for fingers.
            • Gestures should work within the limitations of the browser.
          Essentially, the browser is the only “mobile client”, so it has to deliver a usable experience even on small phones.

          ======================================================================

          18. For content-heavy apps that have to handle mobile portrait width, React Native and Expo may be better than React PWA/Web

          Content-heavy React PWA (no native mobile app)
          • Requirement: must support mobile portrait widths fully.
          • Work involved:
            • Layout reflow, stacking elements vertically, abbreviation of labels, icons instead of text.
            • Splitting content into more tabs, accordions, or collapsible sections.
            • Adjusting touch targets for finger use.
          • Implication: this is significant extra work on top of desktop layout.
          • Recommendation: if the developers are familiar with React Native + Expo, it may be more efficient and future-proof to build a mobile-first app:
            • Native mobile UX is automatically handled.
            • Web can be a secondary target (React Native Web).
            • One codebase for mobile + web reduces the complexity of maintaining separate responsive layouts for tiny screens.

          Desktop/Tablet-first React PWA

          • Requirement: minimum expected screen width, e.g., ~780px.
          • Work involved: minimal for smaller widths.
            • Horizontal clipping below the threshold can be ignored.
            • No need to reflow, abbreviate labels, or create extra tabs for small screens.
          • Implication: content remains usable for the primary user base (desktop/tablet).
          • Marketing/Expectation: clearly advertise as desktop/tablet web app, not “mobile app”.
            • Users understand that very narrow widths may not be fully supported.

           Key insight:

          • If mobile portrait support is required → PWA responsive work can be as much (or more) than building a native mobile app with React Native + Expo.
          • If mobile portrait support is not required → you can safely ignore horizontal clipping, as long as the app is positioned for desktop/tablet.

          So your assessment is correct — the decision largely depends on expected user base and marketing positioning.

          ...

          Even if the app technically runs on mobile browsers, if the user experience is poor (e.g., forcing horizontal scrolling, breaking context, tiny touch targets), it is misleading to market it as a “mobile-capable web app”.

          ======================================================================

          19. Safe Expectations Language for React Native & Expo app, and for React PWA/Web app

          Wording Guideline for React PWA / Web Apps

          1️ Desktop / Tablet Web App (mobile not fully supported)

          • Recommended phrasing:
            • “This is a web app optimized for desktop and tablet screens.”
            • Optional note for clarity: “Mobile browsers can open the app, but the experience is best on larger screens.”
          • Avoid saying:
            • “Works on mobile”
            • “Mobile app experience”
          • Rationale: Prevents false expectations if layout is unusable on narrow screens.

          2️ Web + Mobile (native mobile app exists)

          • Recommended phrasing:
            • “This is a mobile-first app available on iOS and Android, with a web version for desktop users.”
          • Rationale: Sets correct expectations — mobile users get a native experience; desktop users get web experience.

          3️ PWA advertised as mobile-capable

          • If you have done full responsive design for small screens:
            • “This web app works on desktop, tablet, and mobile browsers.”
          • If small-screen support is limited:
            • “This web app works best on desktop and tablet screens. Mobile browsers are supported, but some content may require scrolling.” 
          • Rationale: Avoids misleading users while still being transparent about mobile support.

           Key principle:

          • Only claim “mobile-capable” if the UX on mobile is genuinely usable.
          • Otherwise, clearly position the app as desktop/tablet-first and note any mobile limitations.

          ======================================================================

          Notes

          Jank refers to sluggishness in a user interface, usually caused by executing long tasks on the main thread, blocking rendering, or expending too much processor power on background processes. From: https://developer.mozilla.org/en-US/docs/Glossary/Jank

          From Google Search AI:
          What is Jank?
          Technical Issue: Jank is the technical problem where the application's rendering process is too slow to complete all the necessary work within the time allotted for a single frame. 
          Frame Dropping: For a smooth user experience, each frame must be rendered within a tight time budget (e.g., 16ms for 60fps screens). If a frame takes longer, it's dropped, and the system misses a beat. 
          Causes: Jank is caused by an overloaded main thread, complex computations, slow resource loading, or inefficient code that takes too long to process within the frame budget. 

          What is Stutter?
          Perceived Issue: Stutter is the user's subjective experience of the app not being fluid. It's what you see and feel when the UI hesitates, freezes, or jerks. 
          Result of Jank: Stutter is the visible manifestation of jank. The dropped frames directly lead to the UI freezing or jumping, which is perceived as a stutter. 

          In summary: 
          Jank is the "what": A performance problem where frames are dropped.
          Stutter is the "how it feels": The user's perception of a jerky or unresponsive interface caused by that jank.

          Comments