Navigation: there's no URL bar, so what replaces routing?
React's own Next.js App Router lesson taught file-based routing, matched directly against a browser's own URL. A mobile app has no URL bar and no browser history stack a user can see — navigation has to be modeled explicitly, as actual application state, using a genuinely different mental model.
Intermediate
3 min read
The mental model shift: navigation as a managed stack of screens, not a URL
On the web, the browser itself owns navigation history — a URL is the actual source of truth for "where am I," and the back button is the browser's own built-in mechanism. A mobile app has no browser underneath it at all — React Navigation (the standard library) models navigation as an explicit stack of screens your own app manages, and "going back" means popping the top screen off that stack, a mechanism your app controls directly rather than inheriting from a browser.
Stack navigators: screens pushed on top of each other, exactly like a call stack
A stack navigator pushes a new screen on top of the current one (sliding in, on most platforms), and going back pops it off — the exact same mental model as a literal call stack (Data Structures & Algorithms' own domain), just applied to screens instead of function calls. Passing { id: 42 } as a second argument to navigate is how a mobile app passes data between screens — there's no URL query string to encode it into, since there's no URL at all.
Tab navigators and drawer navigators: two different top-level shapes
A tab navigator shows several top-level sections simultaneously (as persistent tab buttons, usually at the bottom), switching between them instantly with no "push" animation — each tab typically contains its own stack navigator inside it, so navigating deeper within one tab doesn't affect the others. A drawer navigator hides top-level navigation behind a swipe-in side panel, used when there are more top-level destinations than comfortably fit as visible tabs. Real apps commonly nest all three: a drawer containing several tabs, each tab containing its own stack — a genuinely deep, composed navigation tree, not a flat list of screens.
Deep linking: the closest equivalent to a URL mobile apps actually have
myapp://product/42 — opens the app directly to ProductDetail, id=42
A deep link is a special URL scheme that, when opened (from a push notification, a web link, another app), launches your app and navigates it directly to a specific screen with specific parameters — the closest mobile equivalent to a web URL's "this address represents this specific state," even though ordinary in-app navigation never uses URLs at all. Configuring deep linking correctly is what lets "share this product" actually work from inside a mobile app, the same way copying a web URL does.