---
title: Flutter or React Native: Which Shares More Code With the Web?
description: "Flutter vs React Native code sharing: how each reaches the web, what stays platform code, SEO and accessibility limits, and a five-step test to decide."
url: https://miracuves.com/blog/flutter-vs-react-native-code-sharing-comparison
date_modified: 2026-11-19
author: Miracuves Editorial Team
language: en_US
---

*Written by the Miracuves Editorial Team. Reviewed by [Yash Narayan](https://miracuves.com/author/yash-narayan/), SEO Associate, Miracuves.*

    
        
### Key Takeaways

        
- Flutter shares more UI when the web version is an app behind a login, because the same widgets are painted in the browser by its CanvasKit or Skwasm renderer.
- React Native reaches the browser through React Native for Web, which renders real DOM, and Expo can prerender routes to HTML. That makes it the safer choice when the web side has to rank in search.
- Business logic shares equally well in both. React Native’s extra advantage is reusing TypeScript with a React website you already run.
- Secure storage, push registration, payments and background location stay platform code in either framework, so list them before you estimate reuse.
- A shared-code percentage is a result of your product, not a property of the framework. A short proof of concept on your three hardest workflows settles the choice.

    

You are planning one product for iPhone, Android and the browser, and someone on the team asks the obvious question: which framework lets us write it once? Flutter and React Native both claim all three targets. They get there in very different ways, and the difference shows up almost entirely on the web.

This comparison is written for the tech lead or founder who has to defend the choice. It looks at code sharing layer by layer, explains what each framework actually ships to a browser, and ends with a five-step test that settles the question with your own numbers instead of a vendor percentage. Version details are current as of November 2026.

## The Short Answer

If the web version is an application that people use after signing in, such as a dashboard, a booking tool or a member area, **Flutter usually shares more code**. The same widget tree runs on phones and in the browser, so most screens move to the web with layout changes rather than a rewrite.

If the web side must be a public, indexable site, or your company already runs a React and TypeScript web frontend, **React Native usually shares more of the code that matters**. It renders to the DOM on the web, Expo can prerender routes to static HTML, and TypeScript models, API clients and validation can be shared with an existing React codebase.

Everything else in this article explains why, and where both frameworks force you to write platform code anyway. The five-step test near the end is the part that should make the final call.

## Split the App Into Four Layers Before Comparing

“How much code is shared” means little until you say which code. Sharing a date formatter saves an afternoon. Sharing a complete checkout flow saves weeks every time pricing rules change. Break the product into four layers and the comparison becomes concrete.

- **Business logic.** Pricing, permissions, cart rules, form validation, state machines. This rarely needs to differ between an iPhone and a browser, and both frameworks share it well when it lives outside the UI.
- **Data and API integration.** API contracts, data models, error handling, caching rules. Mostly shareable, except token storage, background sync and login redirects, which behave differently on mobile and web.
- **User interface.** Screens, forms, lists, navigation. This is where the two frameworks differ most, because they produce very different output in a browser.
- **Platform features.** Biometrics, push notifications, background location, camera processing, in-app purchases, file access. These need native modules, plugins or browser fallbacks in either framework.

A project that compiles for three targets is not automatically a shared product. The useful question is how many of your layer-three screens and layer-four features need separate work per target.

## How Flutter Reaches iOS, Android and the Web

Flutter apps are written in Dart as a tree of widgets. On iOS and Android the code is compiled ahead of time to native machine code and Flutter draws every pixel itself. On the web, Flutter compiles the same Dart to JavaScript with dart2js, or to WebAssembly with dart2wasm when you build with `flutter build web --wasm`, and paints the UI through its CanvasKit and Skwasm renderers on WebGL or WebGPU. The older HTML renderer was removed from Flutter in 2025, so canvas rendering is now the only path.

That design is the reason Flutter’s UI reuse is so direct. A course card, a chart or a settings screen is the same widget on a phone and in Chrome. Moving a mobile app to the browser is mostly adaptive layout work: breakpoints with `LayoutBuilder` or `MediaQuery`, a sidebar instead of a bottom tab bar on wide screens, keyboard focus and hover states.

Shared Dart packages hold the domain rules, repositories and API models, and a corrected calculation ships to all three targets from one module. If you want to see the mobile side of that workflow end to end, our [step-by-step guide to building and launching a Flutter app](https://miracuves.com/blog/build-launch-flutter-app-step-by-step-guide/) covers setup, testing and store release.

### What changes when a Flutter app runs in a browser

Canvas rendering also creates the web costs a builder has to plan for. These are not edge cases; they decide whether Flutter web fits your product.

- **Search.** Flutter’s own web FAQ says the framework is “not suitable for static websites with text-rich flow-based content,” and that its output does not match what search engines need to index. The Flutter team suggests keeping landing pages, marketing and help content in HTML (or the Dart DOM framework Jaspr) and reserving Flutter for the app itself.
- **Accessibility is off by default on the web.** Flutter builds an accessible DOM from its semantics tree only after a user activates a hidden “Enable accessibility” button. For any product with public users, call `SemanticsBinding.instance.ensureSemantics()` after `runApp` when `kIsWeb` is true, and test with a real screen reader.
- **Web interop code must be modernized for WebAssembly.** `dart:html`, `dart:js` and `package:js` are deprecated and do not compile to Wasm. Browser code should use `package:web` and `dart:js_interop`, and conditional imports should test `dart.library.js_interop`. Older plugins that still import `dart:html` are a common reason a Wasm build fails.
- **Wasm is not universal yet.** According to the Flutter docs, Chromium browsers from version 137 run the Wasm build by default, while Safari and Firefox fall back to the JavaScript and CanvasKit build unless you opt them in through `wasmAllowList`, which works on Safari 26.2 and Firefox 147 or later. Test both outputs.
- **No isolates on the web.** Work you move to a background isolate on mobile, such as parsing a large file, has no built-in equivalent in Flutter web. Plan a web worker or move that work to the server.
- **Offline needs your own service worker.** Flutter no longer generates a caching service worker by default, so an offline-capable web app needs one written and tested separately.

Plugins are the other check. Flutter plugins declare their supported platforms in `pubspec.yaml`, and federated plugins split into an app-facing package, a platform interface and one implementation per platform. Before you adopt a plugin for a critical feature, confirm it lists a web implementation. If it does not, you will write a web version behind the same interface yourself.

## How React Native Reaches the Browser

React Native apps are written in JavaScript or TypeScript with React components such as `View`, `Text` and `Pressable`. On iOS and Android these render as native platform views. Since React Native 0.82, released in October 2025, the New Architecture is the only runtime, so every native library you depend on has to run on it, either natively or through the compatibility interop layer the React Native team keeps in place. That is worth checking before any library reaches your shortlist.

On the web, React Native for Web is a compatibility layer that renders React Native components through React DOM and converts their JavaScript styles to CSS. The browser receives real DOM elements, so text selection, links and screen readers work in the way the web expects. The project’s documentation names Twitter and Flipkart as teams that adopted it inside existing React DOM apps.

### Expo and search-friendly web output

The React Native docs recommend starting new apps with a framework such as Expo, and Expo Router gives one file-based routing system across iOS, Android and web. The detail that matters for public sites is rendering mode. Expo’s documentation states that you must statically render the app to get SEO on the web.

- Set `"web": { "output": "static" }` in `app.json`, then run `npx expo export --platform web` to produce one HTML file per route.
- Dynamic routes, such as one page per listing, need `generateStaticParams` so the export knows which pages to build.
- Content that changes per request needs `"output": "server"` instead, because static mode does not render at request time.
- From Expo SDK 58, titles and descriptions that must exist before JavaScript runs belong in `generateMetadata()`, because tags set with the `<Head>` component update after hydration and are not in the initial static HTML. On SDK 57 and earlier, `<Head>` is still how you set static metadata.

### Where React Native splits code by platform

React Native gives you two tools. For small differences, `Platform.OS` and `Platform.select`, which accepts `ios`, `android`, `native` and `default` keys. For larger ones, file extensions: `Map.ios.tsx`, `Map.android.tsx`, `Map.native.tsx` and, in Expo projects, `Map.web.tsx`, all imported as `./Map`. Expo Router adds one rule: inside the `app` directory a platform-specific route file is allowed only if a non-platform version also exists, so keep platform variants in a components folder and import them from the route.

The `.native.js` pattern is also how React Native shares modules with a React website. The web bundler picks up `Container.js`, Metro picks up `Container.native.js`, and callers import one name. This is the practical route for a company with an existing React product: TypeScript types, API clients, validation schemas and hooks without DOM dependencies move into a shared package used by both apps. Our [React Native development](https://miracuves.com/service/react-native-development/) work usually starts from that shared package.

One limit is easy to miss. A React DOM website and a React Native app do not share JSX automatically. A `<div>` is not a `<View>`, so the UI is shared only if the web app is built from React Native components through React Native for Web.

## Flutter and React Native Side by Side

| Question | Flutter | React Native |
| --- | --- | --- |
| Language | Dart | JavaScript or TypeScript |
| What the browser receives | A canvas painted by CanvasKit or Skwasm, compiled to JavaScript or WebAssembly | DOM elements rendered by React DOM through React Native for Web |
| UI reuse from mobile to web | Very direct; same widgets, adaptive layouts | Direct for components built on React Native primitives |
| Indexable public pages | Not the intended use; keep marketing and content pages in HTML | Possible with Expo static or server rendering |
| Web accessibility | Semantics tree off by default; enable in code | Standard DOM, read by screen readers as rendered |
| Platform-specific code | Conditional imports, `kIsWeb`, federated plugins, platform channels | `Platform.select`, `.ios`, `.android`, `.native` and `.web` files, native modules |
| Library check before adoption | Web implementation listed and Wasm-safe interop | New Architecture support and a web implementation |
| Sharing with an existing React website | Through backend APIs only | Shared TypeScript packages for models, clients and validation |

## Device Features Stay Platform Code in Either Framework

Take a delivery app that needs continuous location, push notifications, camera capture, background tasks and secure credential storage. The rules for displaying an order can be shared. The integrations underneath cannot, whichever framework you pick.

| Capability | Usually shared | Usually platform-specific |
| --- | --- | --- |
| Authentication | Validation, session rules, API calls | Secure token storage, login callbacks, biometrics |
| Camera | Upload workflow and checks | Permissions, capture APIs, browser capture behavior |
| Push notifications | Preferences and message models | Registration with each push service, browser permission prompts |
| Payments | Order totals and backend requests | Payment SDKs, app store purchase rules, web checkout |
| Location | Map data and route logic | Background permissions, device location services |
| Offline use | Sync rules and data models | Storage engine and background sync |

Flutter reaches these through plugins or platform channels; React Native through native modules. Neither removes native engineering. A product built around Bluetooth hardware, background tracking or heavy camera processing will carry far more platform code than an account dashboard, so start the framework comparison with an inventory of device features, not with a reuse percentage.

## Can Either Framework Really Share 90% of the Code?

Figures of 80 or 90 percent circulate in every cross-platform discussion. They can be true for a particular product, but neither Flutter nor React Native publishes such a figure as a guarantee, and the number depends heavily on how you count.

A workable definition is shared production code divided by all production code you maintain:

**Shared-code percentage = shared code ÷ (shared code + platform-specific code) × 100**

For an illustrative project, assume 42,000 lines of shared code, 4,000 lines specific to iOS, 4,000 specific to Android and 10,000 specific to the browser. The result is 42,000 ÷ 60,000 × 100 = **70%**. This is an example to show the method, not a benchmark or a measured result for either framework.

Lines of code are also a weak proxy for effort. Two hundred lines of native payment integration can cost more testing and upkeep than ten thousand lines of plain shared UI. Track the percentage, but decide on the effort per feature change, which the test below measures directly.

## Share Logic Aggressively and UI Selectively

More sharing is not always cheaper to maintain. Picture a reservation product where the phone app uses a short three-step checkout and desktop users need a multi-column scheduler with bulk editing. Forcing both into one component fills it with platform checks that nobody wants to test. Two small presentation components on top of one shared booking module is usually the more maintainable design.

1. **Share business rules aggressively.** Validation, data models, API contracts and state machines should exist once.
2. **Share UI where the experiences really match.** If a component needs more than a couple of platform branches, split it.
3. **Isolate platform features behind interfaces.** One interface for storage, push or payments, with an implementation per platform, keeps each one testable and replaceable.

Keep a boundary on what the client is trusted with. Authoritative prices, permission checks and transaction verification belong on the server, however neatly the client logic is shared.

Applied to typical products, the starting points look like this. They are hypotheses for your proof of concept, not verdicts.

| Product | Likely starting point | Why |
| --- | --- | --- |
| Internal inventory or staff tool on phones, tablets and desktop browsers | Flutter | Same screens everywhere, no indexing needed |
| Existing React website adding iOS and Android apps | React Native | Shared TypeScript packages with the current web codebase |
| Marketplace with public listing pages and mobile apps | React Native with Expo static rendering, or apps plus a separate web frontend on shared APIs | Listings must be indexable HTML |
| Learning platform with a student app and an admin web dashboard | Either; Flutter if the dashboard mirrors the app | Authenticated web, similar workflows |
| Hardware-heavy mobile product with a small web console | Decide on native integrations first | Device code dominates the effort |

## A Five-Step Test Before You Commit

![Five-step cross-platform app development roadmap covering workflow selection, platform expectations, shared architecture, testing, and implementation measurement.](https://miracuves.com/wp-content/uploads/2026/11/cross-platform-app-development-implementation-roadmap-1024x577.webp)

Comparison articles, this one included, cannot see your product. A short technical spike in one or both frameworks can. The aim is to hit the hardest shared workflows first, before ten features are built on an assumption.

1. **Select three workflows** that represent real complexity: for example sign-in with token storage, a data-heavy dashboard, and one feature that touches a device capability.
2. **Define platform expectations** separately for iOS, Android and web: layout, navigation, accessibility, device features, and whether the web page must be indexable.
3. **Build with a shared architecture**: domain logic, data access, presentation and platform adapters in separate modules, with no business rules inside screens.
4. **Run and test on iOS, Android and web** using real devices and the browsers your users have, including Safari. For Flutter, test both the Wasm and JavaScript builds with a screen reader on; for React Native, view the exported HTML with JavaScript disabled to confirm what a crawler receives.
5. **Measure implementation and maintenance**: count shared and platform-specific code, then change a validation rule, a shared component and an API field, and record how many files and test runs each change needed on each platform.

While you run it, watch for the mistakes that shrink real reuse later. A monorepo is not the same as shared code if each platform still owns its own version of every feature. A third-party package that works on mobile may have no web implementation or no New Architecture support. A desktop browser user with a keyboard and a wide screen is a different user from a phone user, even when the screens compile. And one shared test suite does not replace testing on each target, because permissions, browser engines and rendering still differ.

## Where Miracuves Fits

Miracuves builds in both Flutter and React Native, so the recommendation does not have to follow the tools a team already knows. On a new multi-platform product we start where this article starts: the device-feature inventory, the question of whether the web side must be indexable, and a short spike on the hardest workflows. The output is a scoped plan that names which modules are shared and which stay platform-specific.

If the answer points to Flutter, our [Flutter app development](https://miracuves.com/service/flutter-app-development/) team builds the shared widget and Dart package structure described above. If it points to React Native, the shared TypeScript package and Expo rendering setup come first. Either way, the decision rests on your product’s requirements rather than a headline percentage.

  

    Miracuves

    
      Choose the right cross-platform framework for your mobile and web app goals.
    

    
      Explore Flutter and React Native development approaches, shared codebase architecture, iOS and Android compatibility, web integration, UI performance, native API support, maintenance requirements, and technology selection tailored to your product.
    

    
      
        Cross-Platform Development • Flutter & React Native
      
    

  

  

    

      

        [Chat on WhatsApp](https://api.whatsapp.com/send/?phone=919830009649&text=Hi%20Miracuves%2C%20I%20want%20to%20compare%20Flutter%20and%20React%20Native%20for%20a%20cross-platform%20app%20project%20in%202026.%20I%20would%20like%20to%20discuss%20code%20sharing%20between%20iOS%2C%20Android%2C%20and%20web%2C%20UI%20performance%2C%20native%20integrations%2C%20development%20budget%2C%20project%20timeline%2C%20maintenance%2C%20and%20the%20best%20framework%20for%20my%20requirements.&type=phone_number)

        [Book a Consultation](https://miracuves.com/schedule-consultation/)

      

      
        Discuss framework selection, code reuse, mobile and web compatibility, development timelines, and long-term maintenance.
      

    

  

## Frequently Asked Questions

### Does Flutter share more code than React Native?

For an app-style web version behind a login, usually yes, because the same Flutter widgets run on phones and in the browser with mostly layout changes. When the web side must be an indexable public site, or you already run a React website, React Native tends to share more of the code that matters, since it renders real DOM and can share TypeScript packages with the existing frontend.

### Is Flutter web good for SEO?

Not for content pages. Flutter’s own web FAQ says the framework targets dynamic app experiences and is not suited to static, text-rich sites, because its canvas output does not match what search engines need to index. The usual pattern is to build landing, marketing and help pages in HTML and keep Flutter for the signed-in application.

### Can React Native apps run in a web browser?

Yes. React Native for Web renders React Native components through React DOM and converts their styles to CSS, so the browser receives standard DOM elements. Expo and Expo Router build on it to give one routing system across iOS, Android and web, and can prerender routes to static HTML when the web pages need to be indexable.

### Can one codebase really cover iOS, Android and web?

One repository and one main codebase, yes, in both frameworks. Fully identical code, no. Secure storage, push registration, payments, background location and browser-specific behavior still need platform implementations, and desktop browser users often need different layouts. Plan shared business logic and platform adapters from day one rather than expecting every line to run everywhere.

### How do I measure how much code is shared?

Divide shared production code by shared plus platform-specific production code and multiply by 100. Treat the result as a rough signal, because lines of code do not reflect effort. A better measure is to change one validation rule, one shared component and one API field, then count the files and test runs each change needs on every platform.

### Should a web dashboard use the same codebase as the mobile app?

It can when the dashboard mirrors the mobile workflows and does not need search indexing, which is where Flutter or React Native web both work well. If desktop users need dense multi-panel views or the pages must rank, a separate web presentation layer on top of shared APIs and business logic is often easier to maintain.

## Disclaimer

**Miracuves is an independent software development company.** We are not affiliated with, connected to, sponsored by, or endorsed by any of the brands or platforms named on this page. Names of the form “Brand Clone” are used descriptively: it is how the software industry refers to building a platform with functionality comparable to a known service, and how clients search for it. The entire design and codebase of our products is built by our own team and contains no code, design, graphics, or content originating from any third-party website or application. All third-party names and marks are the property of their respective owners. [Full Legal Notice & Disclaimer](https://miracuves.com/disclaimer/)
