Skip to main content

Routing

A component with an href presses through the app’s router once the app is wrapped in RouterProvider, which takes the router’s navigate. Without one, and for any URL with a scheme of its own such as https: or mailto:, the href is opened with Linking.openURL.
app/_layout.tsx
The as Href is there for typed routes, which type push with the app’s own paths rather than any string.

Localisation

Wrap the app in I18nProvider and the components write in its locale: the library’s own words, such as a pending ring’s name, a bottom sheet’s handle or a calendar’s chevrons, and its numbers and dates, such as a Currency’s amount or a Calendar’s month. A component given a locale of its own writes in that one instead. Outside any provider, and for a locale the runtime cannot parse, the components write in the device’s. So an app that follows the device needs no provider. One with a language setting of its own passes it, falling back to the device’s first language:
app/_layout.tsx
useLocale() returns direction and locale, as React Aria’s does on the web, for an app’s own formatting to match.
The direction is I18nManager’s, which is what React Native lays out by. The provider sets none: an app turns its layout over with I18nManager.forceRTL and a reload.