Skip to content

React Native to Flutter: How We Migrated Loggd

Why React Native with Expo couldn't keep up with our custom design system, and how we moved about 50,000 lines to Flutter with Claude Code and Codex. With our prompts, costs and token counts.

Tobias16 min read

You noticed it most on your own profile. If you had logged a lot in Loggd, your profile visibly stuttered, even on a high-end Android phone like the S26 Pro. Tapping a link came with small hitches too. On average the app ran at about 45 frames per second instead of 60, and that made everything feel a little cheap.

Back then Loggd was built with React Native and Expo, before we migrated to Flutter. React Native gives you an iOS and an Android app from one codebase, and that's exactly what we need. Mostly one person works on the apps, and a native web version is still to come. We simply can't afford two separate native apps.

Even so, we rewrote the whole app in Flutter. In this post I'll explain why we did it, how we moved around 50,000 lines of code with Claude Code and Codex without ending up with a vibe-coded mess, and what it cost.

Why we started with React Native

We had worked with React on the web and with Flutter, but never with React Native. What tipped it was that we're more at home with web technologies as a team. We hoped to build the later web version quickly on the same base: the same React, the same libraries, plus the platform differences and a new responsive design.

We made that call purely from research. Everyone said React Native's performance was now almost on par with Flutter and you didn't need to worry about it anymore. That's actually true, as we found out ourselves. Just not for every app.

Where React Native hit its limits for us

If an app sticks to the native design system, meaning Cupertino on iOS and Material on Android, it runs great with React Native. Native components, a few simple animations, done. And the developer experience with Expo is brilliant.

But Loggd doesn't look like Cupertino or Material on any platform. We built every component ourselves for a fully custom theme with gradient borders, drop shadows, blur views and heavily animated layouts. That's where React Native hits its limits. We felt it much earlier on Android than on iOS.

The worst were screens that render lots of components at once. Browsing movies, shows and games from our shared data platform, for example. Or your own profile after lots of logs. The app rarely felt like 60 FPS.

I won't deny that part of it was a skill issue. We could surely have kept optimizing. At some point, though, we asked ourselves whether it was still worth it. We kept running into limitations, building workarounds, pulling in native libraries and watching performance all the time. Getting blur views to work on both platforms alone probably cost us several days over time. We could have spent those days building features.

Why we chose Flutter

So we switched. Flutter is basically a canvas inside a native app. Instead of using the platform's native components, Flutter draws everything itself with its own rendering engine built for smooth 60 FPS (Flutter docs on performance). React Native gives you a kit of ready-made parts, Flutter gives you a blank canvas.

For our custom design, the canvas is exactly right. We draw gradient borders with our own canvas painter. Blur and animations come built in; a blur, for example, takes two lines of code. More elaborate animations run efficiently through Lottie. We barely need performance tuning after the fact, just a well thought-out structure.

Flutter wasn't new to me. Even before the AI boom I built apps professionally and made a few mid-sized hobby projects in Flutter on the side. Those turned out to matter for the migration.

Why "Migrate the app to Flutter" isn't enough

With agentic coding, a decision like this is easier than it was a few years ago. Still, just telling Claude Code "Migrate the app to Flutter" isn't enough. Not if you don't want to end up with a vibe-coded slop app. We had to sort out four things first:

  1. The dependencies don't map one to one. Expo Updates, TanStack Router and Query, Expo Analytics, RevenueCat, the file picker: anything that works natively behaves differently in Flutter or doesn't exist there in that form. We needed an alternative for every package before we started.

  2. The AI needs a fixed structure. Every bit of freedom creates inconsistencies, and the code gets messy and hard to maintain. So we leave it as little room as possible.

  3. The architectures work differently. The Expo app was built around TanStack Query with offline support. Flutter works best with View, ViewModel, Repository and Service. Those have to fit together cleanly.

  4. Around 50,000 lines is too much for one session. To keep the context clean, we had to split the migration into small chunks that match the TypeScript source files as closely as possible.

That turned into four steps: three for prep and the migration itself as a loop.

Diagram: three prep steps before the migration from React Native to Flutter. Step 1: four old Flutter hobby projects, one Opus agent analyzes each, Fable merges the results, reviewed by hand, the result is the FLUTTER_ARCHITECTURE_GUIDE. Step 2: the React Native app with around 50,000 lines, Opus plans and Fable reviews, the design system from styles.css and Tailwind becomes DESIGN.md, the result is steps, README.md and DESIGN.md. Step 3: one bootstrap prompt for theming, routing and CI/CD, reviewed by hand, the result is the Flutter scaffold. Everything feeds into step 4, the migration loop with one HANDOVER.md per session.

How we prepared the migration

1. Mining the old Flutter projects

After a few years away from Flutter, my hobby projects were a good foundation. I put them all in one folder and pointed Claude Code at them with the Fable model. Fable is the strongest and most expensive of the Claude models we used; Opus and Sonnet are the cheaper tiers below it.

So Fable sounds expensive. But most of the usage usually goes into the many output tokens. That's why Fable only plans and merges, while cheaper Opus agents analyze the individual codebases. With four projects, four Opus agents each summarize one in a document. Fable takes the four documents, makes decisions and looks for current alternatives to dependencies that have since gone stale:

You are a orchestrator agent. This folder contains complete and professionally per hand developed flutter applications. These are a few years old, but the general structure should be the same for today.

Your task is to determine folder structures, architectual patterns, libraries & tools used, code style and general best practices. Generate a document describing the how to implement a scaling, professional, performant flutter app with amazing development experience.

For this spawn Opus Agents for each projekt, giving this prompt so they return a handover of this project. Take all the handovers, analyze, optimize, modernize them and output the resulting document.

I then worked through the result by hand and adjusted it until I was happy. Don't have Flutter experience or projects of your own? Then I'd build some up first, before you kick off something like this and hope the AI will sort it out.

2. Having the React Native app analyzed

For an LLM there's no better context than existing code. It's structured and unambiguous, there's nothing to interpret. That's why a migration like this works so well in the first place.

To save tokens and make life easier for the migration agents later, we invested once more in planning and discovery. One Opus session coordinates, and at the end a Fable agent checks the plan for contradictions. The planning goes through the whole app once, maps the packages in use to Flutter and builds a kind of table of contents that points straight to the relevant React Native files. To do that it splits the app into features, sets the order, says what can run in parallel and writes a separate plan for each step:

Create a plan to migrate this whole expo/react native repository to flutter. You must analyze the features/routing/repository and create steps with absolute references to this original repository on what to implement in what order, so the migration can happen in multiple steps so everything goes clean (e.g. backend + auth first, then explore page and so on).

The goal should be a document describing the general plan and multiple documents for each step, so i can give it to the actual implementation sessions/agents later. All the features currently implemented, should be existing in the future. Don't create details on how to implement it in flutter, just references to source files, what the features does, requirements and so on. The agents figure out the implementation by there own.

If you are unsure about something, ask as many questions as needed to create the plan. Write the actual plans with its context with this opus session as some sort of cordinator. If you need to gather general information using opus or sonnet agents for simple things. At the end, use a fable agents which validates the plan and looks out for problems/inconsistensies or other things like this.

For the dependencies this project uses, find alternatives and ask the developer for verification. Note the decisions in the plans this dependency is needed.

The design system was a topic of its own. In the React Native app it lived in a styles.css and in Tailwind with custom components. Flutter needs the same knowledge to theme its components. Google has proposed a spec for this, DESIGN.md (spec on GitHub). It records all colors, spacing, font sizes and tokens and describes when each one applies. Luckily our design system already lived in Figma with descriptions and had been imported into Tailwind. One prompt turned that into the DESIGN.md:

For the @src/styles.css create a DESIGN.md spec file describing the design and decisions made in this project which form the look of loggd. 

You can finde the spec for the DESIGN.md file here: https://raw.githubusercontent.com/google-labs-code/design.md/refs/heads/main/docs/spec.md
  
Also find facts in the repository how we style things (e.g. button, inputs heights, gaps, text sizes, borders, radiuses and so on) to see what is actually used and at what positions

After this step the repository had a steps folder with the plans, a README.md, a FLUTTER_ARCHITECTURE_GUIDE and a CONVENTIONS.md. During the migration a HANDOVER.md joined them. The agents use it to pass the current state from one session to the next, like a handover note at a shift change.

3. Setting up the scaffold

With that prep, the third step was pretty simple. A single prompt bootstraps the repository: theming, general widgets, the first routing, a feature prototype that shows the data layer, splash screen and other native configs, app flavors and the CI/CD pipeline.

Use .migration/FLUTTER_ARCHITECTURE_GUIDE.md and .migration/README.md to bootstrap the repository and use the DESIGN.md spec to boostrap the design system. Create a feature slice demonstrating the data/service/repository layer, setup dependency injection, general widgets, initial routing, splash screen and native configs from the other app, app flavors and a codemagic ci/cd pipeline.

After that we reviewed and fixed things by hand until the structure was the way we wanted it. Every later session builds on this scaffold.

The migration runs as a loop

Step four, the migration itself, ran as a controlled loop, feature by feature, until everything from the old app had been carried over. Every session starts with the same prompt. We let the agent run until it asks questions or is done. If you like, you can add context about the current feature:

/orchestration Overall Goal: Migrate the react native and expo codebase to this flutter project. Use .migration/README.md as your guide, since it describes and routes to the old implementation.

Don't just implement what the migration guide says. This has now knowledge of the current repository state, so don't just trust it. Rather use it as guide to design the migration / feature implementation for flutter following its and this repository defined best practices for caching, api layer, repositories and so on. Always look at the memory if you need more context, or ask developer if context is missing and decisions are needed. Never assume. If something is not trivial (e.g. a js/expo package needs a new replacement tool, verify by asking before deciding by your own).

Since this is a multi step implementation, in the migration folder read and edit a handover file and keep it up to date. This holds the state of the migration, so what is done, what is on hold and why, what still needs done, progress of the migration and so on. Keep it compact and meaningful and audit after every step finishes. The goal is that the next session for the next step can use this handover as context to flawlessly continue with the migration. So do one step at a time based on the current progress.

Verify the evidence before you call it done. Never test your own on a simulator. 

Behind /orchestration sits a skill that hands work out to models. It starts with Opus. Opus estimates which model can do each task most cheaply. Sonnet analyzes a feature and implements it according to plan. Fable drafts the plan, and may also implement difficult or security-sensitive tasks itself. That way we don't burn tokens from expensive models on cheap tasks.

On top of that comes Codex from OpenAI, which also explains the table further down. We worked hybrid: basically, I planned with Claude, implemented with Codex and then ran the audit with Claude again. That way no tool checks its own work.

Diagram of the migration loop: start a session and read HANDOVER.md, plan with Claude (Opus, Fable), implement with Codex or Sonnet, test it ourselves, polish. If we're not happy, it goes back to polishing. If we're happy, an audit with Fable checks for slop, then HANDOVER.md is updated and the next session begins, until everything is migrated to the Flutter app. Planning and audit run on Claude, implementation on Codex, so no tool checks its own work.

Once the implementation is done, it's our turn. We test, polish by hand or with more prompts, and only give the green light once we're happy. Business logic, the data layer and functionality worked cleanly on the first try in what I'd estimate is 95% of cases. React code with Tailwind is excellent context for the agents. The UI behaves very differently in the two worlds, though, and that's where small problems came up often: layout, font sizes, spacing, animations.

With lots of polishing prompts, agents tend toward slop: overly complex implementations, unnecessary files, redundant doc comments. If we drag that into the next step, the app bloats feature by feature. So after the green light, an audit skill runs with the strongest model, Fable, which means Claude again. It's tailored to our coding style, which we also extracted during prep, and is backed by language-specific audit skills. Basically a linter for LLMs.

Once the feature has been audited, the loop updates HANDOVER.md. The next session starts with the same prompt, and everything begins again.

The most important part is that we check every step ourselves. You could surely let the loop run on its own for a few nights. That sounds faster, but it isn't. In the end we'd have to polish and test the whole app in one go. And the technical debt would grow with every step, because later sessions build on foundations that already have bugs.

What switching from React Native to Flutter got us

We didn't measure systematically. The numbers are spot checks we took during development, not benchmarks. You still notice the difference right away.

React Native with ExpoFlutter
Lines of codearound 50,000about the same
App size80 MB60 MB
Frame rateabout 45 FPS on averagea steady 60 FPS
Startup timeabout 1 sunder 200 ms

Spot checks from development, on devices including an S26 Pro, not a systematic measurement. The Flutter app also has more features than the old one.

Tiles: before and after, React Native vs. Flutter. App size from 80 MB to 60 MB, frame rate from about 45 FPS on average to a steady 60 FPS, startup time from about 1 s to under 200 ms, lines of code around 50,000 before and about the same after. Spot checks from development, on devices including an S26 Pro, not benchmarks.

The app got a quarter smaller even though it does more. But the biggest win is something no table shows: the micro-stutters are gone. That makes the app feel many times smoother, even though the differences don't look huge on paper. Since then we've added far more animations, page transitions, glass effects, gradients and blurs without a single workaround. Flutter has gone along with every design decision we've made so far.

What the migration cost

The migration took a few weeks. During that time we had two subscriptions: Claude on the Max plan for €180 a month and Codex from OpenAI on the Pro plan for €229 a month. Around €400 a month and a few weeks of work to move to a completely new language is a good deal for us. Here's how usage was split across the models during the migration. Because we worked through subscriptions and not the API, there are no per-model costs. K stands for thousand, M for million and B for billion tokens.

ModelCallsInputOutputCache WriteCache Read
claude-opus-512,99726.0K6.6M35.1M1.9B
claude-sonnet-516,37132.7K1.6M39.2M2.0B
claude-fable-5-149329.3K201.7K4.8M61.6M
claude-fable-534569051.9K3.0M7.5M
gpt-5.6-sol21,14451.2M7.6M02.6B
gpt-6-astra4,92418.6M1.3M0485.7M
gpt-5.6-terra6,43124.6M2.6M0624.6M
gpt-5.6-luna1896.8K4.8K0617.0K
codex-auto-review3,38827.4M311.3K0150.6M
unknown4968.5K2.2K019.5K
Total66,118~123.0M~20.3M~82.0M~7.8B

Token usage across the whole migration, from Claude Code and Codex.

What stands out is how much cache reads dominate: around 7.8 billion against about 20 million output tokens, almost 400 times as many. The agents read existing context far more often than they write new text. Luckily that's the cheap part.

What I'd advise before a migration like this

Test a framework with your own use case before you commit. Research alone isn't enough. Other people's experience says little about how a framework handles your design system and your animations. That's the trap we walked into.

And in a migration, don't count on your LLM of choice to somehow pull it off. Don't let the same tool do planning, implementation and audit, and look at what your agents actually read. Our test runner, for example, quietly cost us a whole subscription, because it printed every passing test (over 4,000 of them) every single time and flooded the context.

Otherwise you end up with a few billion wasted tokens and a sloppy app that soon has to be migrated again, because the codebase doesn't grow with the idea.

What's next

That leaves the web version, the reason we picked React Native in the first place. We're now building it as a separate project in React. Loggd looks different on the web anyway, because a website is structured differently from an app. As context we use the Flutter app and the React code of the old app. That way both platforms get clean code and native performance.

Everything else we're building next is on our roadmap. The post on what makes Loggd different shows which features are already in the app today, and the one on recommendations across media explains how movies and games come together in Loggd.

You can try how a profile with lots of logs feels today at loggd.me. Questions about the migration, Flutter or our setup with Claude Code and Codex? We're happy to answer them on Discord.