The task that started it

I thought the hard part would be making the phone talk to the backend. It wasn't.

The task arrived during my HNG internship. Lesson 2 asked for a shopping web experience. I built one: a storefront called Lumé House, in React and TypeScript, with Supabase behind it. Lesson 3 asked for a mobile counterpart connected to the same backend.

I chose React Native and Expo. I wanted to explore mobile development, and Expo let me do that while building on the React knowledge I already had. That was my reason: curiosity first, and a shorter path from what I already knew. The task asked for a mobile counterpart; the choice of framework was mine.

One expectation shaped everything that followed. I expected a change made to an authenticated cart on one client to appear on the other. If I added something on the web, the phone should know. That is the version of the story I had in my head.

The version I built is simpler, and I should say so at the start: each client reads the shared server state when it refreshes. There is no live push between them. The gap between what I expected and what I built is most of what this article is about.

I submitted the mobile task. Then I kept building. The task gave me a reason to start; the rest of this article is about what the device taught me after that.

What came with me from React

The React model transferred almost intact. Components, props, hooks, state, TypeScript types, the habit of splitting a screen into pieces that can be reasoned about separately. Expo SDK 57 runs React Native 0.86 with React 19.2, and the code I wrote looked like React because it was React.

The Supabase client transferred too: the same JavaScript library, and the same shapes for products, variants, prices and orders. I did not have to relearn my own data model. Both clients were built against the same schema, so neither one needed its own version of what a product or an order was. That was the part I could trust while everything around it changed.

The catalogue's search, category filtering and four sort modes were plain logic operating on plain objects; moving that logic was not the hard part.

The app has four tabs now — Home, Shop, Cart and Account — and a catalogue that can search, filter and sort. The four-tab shell came after the first version, but the domain was already familiar.

The testing habit transferred as well, at least in principle: write tests around behaviour rather than appearance. I would later learn that the principle was right and my test harness was not, but that is a story for later.

What helped most was that the web storefront already existed. I was not starting from a blank page. I knew what a product was, what a variant was, what the cart was supposed to do. The mobile app was a second client for a domain I already understood.

I did not port the app. The mobile repository is its own codebase with its own navigation, storage and interface. What the two share is a backend and a set of ideas about how the shop should behave. That distinction matters: a port would have been a copy, and a copy would have hidden the parts that do not travel.

What I had to learn

The first thing that stopped transferring was the browser.

On the web, routing is a history object and a URL. In Expo Router, routes are files, and the navigator is a native stack or a set of tabs. Typed routes help, but the mental shift is bigger than the API: back is a platform behaviour, not a browser button. A deep link is a route that must exist before anyone opens it.

That sounds small until a sign-in link arrives from outside the app. On the web it is another page load. On the phone it has to wake the app, find the right route, and still know what the user was doing before the link arrived.

Storage changed next. In the browser I had storage that the page could reach whenever it wanted. On the phone, session state lives in AsyncStorage, and the Supabase client has to be configured for it: persisted sessions, token refresh, and a refresh when the app comes back to the foreground. There is no shared cookie jar and no address bar. The app is the only context.

Authentication made the difference clearest. On the web, Google sign-in is a redirect. The browser leaves my page, the provider sends the user back, and the session is waiting. On mobile there is no page to return to. I needed a custom URL scheme, a system browser session, a callback route and an exchange of the authorization code. That meant PKCE, a pending-authorization timestamp, and deduplication for the case where the callback fires twice. The browser had been doing more for me than I had noticed.

Layout was the quietest change and the one that kept showing up. CSS grid and flexbox became style objects, FlatList, safe areas and density-independent pixels. A 320 dp screen and a 1.3 font scale are not edge cases; they are configurations a real person can be using. Android treats a font-scale change as a configuration change, and the generated manifest did not declare it. I added a small config plugin so the activity handles it instead of being recreated. That was the first time accessibility showed up in my work as a lifecycle problem rather than a style problem.

None of these changes were impossible. They were simply not optional, and each one removed a little more of the assumption that the browser would handle it.

Comparison of React knowledge that transferred to React Native and native concepts I had to learn

What transferred — and what I had to learn. The framework versions listed are this project's stack, not a general recommendation.

The phone fights back

The Shop tab crashed every time I opened it on the device.

Not sometimes. Every time, from the tab bar and from the hero action on the home screen. The same screen worked in tests. On the phone it closed the app.

The device log pointed at the layout handler, not at the data or the network. That narrowed the problem to the lifetime of a value I had assumed would still be there.

The cause was a reference to a synthetic event that React Native had already released. I was reading the layout width inside a state updater:

// before: the updater reads the event after React Native releases it onLayout: (event) => setRail((previous) => previous.viewport === event.nativeEvent.layout.width ? previous : { ...previous, viewport: event.nativeEvent.layout.width }), // after: read the value while the event is alive, then queue the update onLayout: (event) => { const viewport = event.nativeEvent.layout.width; setRail((previous) => previous.viewport === viewport ? previous : { ...previous, viewport }); }, 

React may run the updater later. React Native releases the synthetic event when the handler returns. By the time the updater ran, nativeEvent was null, and the app died on a property read. The fix was small: read the number while the event is alive, then queue the update with the number.

The fix is not the interesting part. The interesting part is why my tests missed it.

My test harness applied state updates immediately. That is convenient, and it is not how React behaves. The crash lived in the gap between "the handler returned" and "the updater ran", and my harness had no such gap. The tests were green because they were not modelling that timing.

So I wrote a test that does model it: it queues the updater, nulls out event.nativeEvent before flushing, and asserts that the width survived. A second test does the same through the React 19 renderer. Then I put the original implementation back and ran both tests: both failed. I restored the corrected implementation and ran them again: both passed. That is the result I wanted — the tests fail on the code the fix replaced and pass on the code that replaced it.

That falsification is the part I trust. A regression test that has never failed on the bug it targets is not yet evidence that it covers the bug.

Four-step diagram showing a React Native event being released before a queued updater reads it, causing a crash

The event-lifetime defect recorded in this project — not a claim about universal React Native behaviour.

Designing for two clients

One of the interesting parts of building the mobile app was connecting it to the same backend as the web storefront.

I wanted someone to be able to interact with their cart on one platform and find the same information on the other. But sharing a backend introduced questions I hadn't fully considered when I started.

What happens when two clients try to change the same cart? What happens when a request succeeds but the response never reaches the app? And how do you prevent a retry from accidentally adding the same item twice?

Working through those questions introduced me to idempotency, conflict handling and the importance of treating the server as the source of truth.

The approach I built uses server-backed cart operations and makes conflicting changes visible rather than silently overwriting them. Updates between the web and mobile clients become visible when the other client refreshes, rather than appearing instantly.

It taught me that connecting two applications is not just about making API requests. It's also about deciding how they should behave when things don't go as expected.

After submission

Submitting the HNG mobile task wasn't the end of the project for me.

I kept working on the application, expanding the shopping experience with authentication, cart management, checkout, order history and improvements to the Android build.

One milestone that meant a lot to me was installing the standalone app on my Android phone and opening it without a development server running in the background.

Seeing the application run independently was different from watching it work inside my development environment. It made the transition from web development to mobile engineering feel much more tangible.

I also started paying closer attention to things I hadn't thought about as much when building for the browser: app configuration, navigation behaviour, screen sizes and how changes behave on an actual device.

The project is still evolving, but continuing beyond the original task gave me opportunities to learn that I wouldn't have encountered by stopping at submission.

What this experience taught me

Moving from React to React Native taught me that knowing a framework doesn't mean knowing every environment it runs in.

I brought my understanding of components, state, TypeScript and API integration with me. But mobile development introduced a different set of challenges, from navigation and authentication to layout behaviour and debugging issues I hadn't encountered on the web.

My QA background also changed how I approached those challenges. I wasn't satisfied with getting a feature to work once. I wanted to understand what could break, test the behaviour and make the implementation more reliable.

Some of that confidence came from automated tests, while other parts came from working through the application on an actual device. I also learned to distinguish what I'd verified locally from what still needed testing in a real environment. Testing also taught me to be precise about what I could confidently say worked. My automated checks covered the authentication and checkout logic using mocked backend responses, while live-account verification remained a separate step.

That's probably my biggest takeaway from this transition: building something and validating it are two different responsibilities, and both matter.

I'm still learning React Native and Expo, but I now understand mobile engineering much better than I did when I started.

And that's progress worth sharing.

Where this leaves me

The web taught me to build. The phone taught me to check what the platform was doing for me.

What I want next is not dramatic: an iOS build, a TalkBack pass, and a store build I can stand behind. Lumé House is still an ongoing project, with more I want to explore on both the web and mobile sides. This article focuses on my move from React to React Native and Expo, but that is only one part of the engineering journey. As I keep building, I will have more to share about the decisions, challenges and testing behind both applications.

If you write React and you are thinking about mobile, start with the parts you already know. Then go looking for the help the browser used to give you. That is where the learning is.