Skip to content

Common application tasks ​

Start with what the application needs to do. These paths lead to a working pattern, then the API details and platform constraints. For complete running apps, use the example gallery.

I want to…Use this patternCheck before shipping
Open a detail and return to the same listFirst app, push / backKeep query state in the retained list page; visibility is not mounting
Ask before losing an editConditional leave guardActivate only while dirty; iOS swipe-back is disabled while the guard is active
Return a selected or edited valuepushForResult and back({ result })Handle undefined for cancellation; generic T is not runtime validation
Require login before a destinationGlobal or route guardsRedirect to an allowed route; a leave guard does not run just because another page is pushed
Keep separate histories for top-level destinationsNamed stacks in tabsA drawer alone does not create one stack per menu item
Keep a menu visible in a wide windowAdaptive drawerMeasure the container width; permanent pane visibility differs from overlay open
Show list and detail togetherSplit navigationChoose Frame split or UIKit split; follow the documented root/container constraints
Share an action between header and menuPage actionsThe app still owns business operations, confirmations and permissions
Search within a retained pageNative searchSearch query is application state; typing does not add navigation entries
Open a destination from an OS linkDeep linksConfigure the native manifest/entitlements, route mapping and target stack
Receive an image or system documentNative flowsDistinguish cancellation from failure and respect page/window ownership
Recover after the OS kills the appState restorationPersist serializable app state; JavaScript Promises do not survive process death
Return accessible focus after a modalNavigation focusProvide stable native target IDs and test with actual assistive technology
Explain a failed or slow navigationDiagnostics and report viewerExport from the affected app; synthetic sample reports are not device benchmarks

Choose the next level of detail ​

When optional features help ​

File routes can replace a large explicit route table; layouts and middleware organize shared conventions. Route loaders, native Suspense, windows and custom hosts/destinations remain experimental where marked. Add them for a concrete application requirement after the basic navigation flow is working.

Released under the MIT License.