Genesis

Packages

@marktiderman/genesis-native

0.16.0Primitive · Shells

The native app shell: `GenesisNativeApp` (boot behind the splash, fatal screen, persisted query client, auth gate, held deep links; each part a slot and exported on its own). See packages/native/README.md.

The native app shell for Genesis Expo apps. `<GenesisNativeApp>` owns everything above your screens, so the root layout is a few lines:

SplashScreen.preventAutoHideAsync();

pnpm add @marktiderman/genesis-native

READMEChangelognpm

@marktiderman/genesis-native
The native app shell: `GenesisNativeApp` (boot behind the splash, fatal screen, persisted query client, auth gate, held deep links; each part a slot and exported on its own). See packages/native/README.md.

Components (6)

  • AuthGate

    Render one tree for a signed-in user and another for everyone else.

  • BootScreen

    The default boot slot: a plain loading view (the splash covers it at launch).

  • FatalScreen

    The fatal screen: what went wrong and "Try again", for the whole app, one screen, or (with `kind="plain"`) the last resort that needs nothing above it.

  • GenesisErrorBoundary

    An error boundary whose fallback gets `{ error, retry }`.

  • GenesisNativeAppBeta

    The root of an Expo app: theme, keyboard, data, boot behind the splash, errors, session and held links.

  • ScreenErrorBoundaryBeta

    A boundary around part of a screen tree, for apps without Expo Router's per-route boundaries: non-fatal, reported, with "Try again".

Hooks (5)

  • useBlocks

    The resolved blocks: their ids, nav entries, Settings rows, routes and the rest, each tagged with its FeatureId. Throws outside `GenesisNativeApp`.

  • useBlockSettings

    The app's Settings sections with every block's rows added: each row goes at the end of the section its `section` names (by `order`, then block order), and a section no one has yet is added after the rest.

  • useBoot

    The boot's status, and `retry` after a failure. Inside `GenesisNativeApp` or a `BootProvider`.

  • useHeldLink

    Follow the held link after a sign-in, drop it otherwise; returns the link still held.

  • useSession

    The session and whether it is known yet. Inside `GenesisNativeApp` or a `SessionProvider`.

Other exports (30)

BEFORE_RELOAD_TIMEOUT_MS · BootProvider · BootTimeoutError · classifyError · connectQueryLifecycle · contactHref · createBoot · createHydrationGate · createLinkHold · createNativeQueryClient · createScreenErrorBoundary · createSessionStore · DAY_MS · DEFAULT_FATAL_SCREEN_LABELS · defaultErrorUtils · defaultRejectionTracker · errorDetails · errorMessages · installGlobalErrorHandler · installRejectionTracker · mergeBlockSettings · normalizeLink · onBeforeReload · PlainFatalScreen · queryKeyName · reportError · reportQueryErrors · runBeforeReload · ScreenErrorScreen · SessionProvider

And 51 types.

@marktiderman/genesis-native/persist

Other exports (2)

createQueryPersistence · persistQueries

And 3 types.

@marktiderman/genesis-native/offline

Other exports (3)

cacheScope · persistOffline · sqliteLocalCache

And 5 types.

@marktiderman/genesis-native/updates

Components (4)

  • PreviewNotice

    A small bar over every screen while a preview is open: which one, and Leave.

  • PreviewScreen

    What a preview link opens: confirm, load, restart into the preview.

  • UpdateBanner

    Non-blocking: floats over the top of the screens while an update is downloaded. Liquid Glass on iOS 26 when the app passed expo-glass-effect (`modules.glass`); the solid secondary surface otherwise.

  • UpdatesRoot

    The block's parts around your screens.

Hooks (13)

  • useBlockReload

    Hold reloads off while `active` (a form with unsaved changes): `useBlockReload(form.formState.isDirty)`. Does nothing without an updates block, so a screen can call it whether or not the block is on.

  • useCanReload

    True when a reload would be allowed now.

  • useChannelState

    The picked channel and the build's own, kept current.

  • useForceUpgrade

    The force-upgrade screen's props, or `null` when this version is supported.

  • useMaintenance

    The maintenance screen's props, or `null` when maintenance is off (or not known live).

  • usePreviewNotice

    The notice's props while a preview is open, else `null`.

  • useUpdateBanner

    The banner's props, or `null` when there is nothing to show.

  • useUpdateCheck
  • useUpdatePolicy
  • useUpdates

    The block from `UpdatesProvider` / `UpdatesRoot` / `GenesisNativeApp`. Throws outside one.

  • useUpdateVerdict

    What the policy says now: `ok`, `forceUpgrade` or `maintenance`.

  • useVersionSignature

    The version signature, with the channel picked on this device once it has been read.

  • useWhatsNew

    The notes to show now, or `null`.

Other exports (29)

CHANNEL_NAME · CLOCK_SKEW_MS · compareVersions · createChannelSwitcher · createPolicyStore · createReloadGuard · createUpdateChecker · createUpdates · createWhatsNewStore · evaluatePolicy · ForceUpgradeScreen · isBelowMinimum · isChannelName · isChannelNotFoundError · MaintenanceScreen · notesSince · parseVersion · PREVIEW_PATH · previewLink · previewLinkChannel · previewPath · sanitizePolicy · staticPolicySource · supabasePolicySource · UPDATES_BLOCK_ID · UpdatesProvider · versionSignature · WEEK_MS · WhatsNewSheet

And 41 types.

@marktiderman/genesis-native/push

Components (2)

  • NotificationSettings

    The notification preferences screen. Needs the push block (in GenesisNativeApp's `blocks`, or a `PushProvider`).

  • PushRoot

    The block's parts around your screens. Must be inside GenesisNativeApp's session (or a `SessionProvider`).

Hooks (12)

  • useBadge

    The badge: `set(unread)`, `clear()`.

  • useNotificationCategories

    The categories part (rung 4).

  • useNotificationPreferences
  • useOptionalPush

    The block, or null when push is off: for a screen that works either way.

  • usePrivacyPreviews

    The privacy part (rung 4).

  • usePush

    The block from `PushProvider` / `PushRoot` / `GenesisNativeApp`. Throws outside one.

  • usePushPermission

    The permission part (rung 4).

  • usePushPermissionState
  • usePushPrompt

    The soft prompt: `offer("to hear when someone replies")` at the right moment.

  • usePushRegistration
  • useQuietHours

    The quiet-hours part (rung 4).

  • useSuppressNotifications

    Hide notifications that match while this screen is open (`data` is the notification's `data`): a chat screen hides pushes for its own thread. Does nothing without a push block.

Other exports (31)

canPush · categoryRows · clockOf · createPermissionStore · createPreferencesStore · createPromptStore · createPush · createRegistration · dateAt · DEFAULT_PREFERENCES · deviceTimeZone · formatClock · isQuietAt · isRichPushUrl · minutesIn · notificationAction · notificationData · notificationSettingsCopy · parseClock · pathForResponse · permissionRows · privacyRows · PushBackendError · PushPromptSheet · PushProvider · quietHoursRows · RICH_PUSH_IMAGE_FIELDS · richPushMessage · statusOf · supabasePushBackend · validPreferences

And 47 types.

@marktiderman/genesis-native/observability

Hooks (2)

  • useObservability

    The block, or `null` when it is off (so a screen can call it whether or not the block is on). @stability Beta

  • useRecentActivity

    The last breadcrumbs and errors, scrubbed; empty when the block is off. @stability Beta

Other exports (31)

checkEvent · consoleSink · createObservability · createScreenErrorBoundary · defineEvents · FILTERED · isSecretKey · OBSERVABILITY_BLOCK_ID · OBSERVABILITY_SETTING_SPECS · ObservabilityProvider · observabilitySettings · observabilitySettingValues · observeSink · parseSentryDsn · resolveSentryDsn · ScreenErrorScreen · scrubbedError · scrubBreadcrumb · scrubEvent · scrubRecord · scrubString · scrubUrl · scrubValue · scrubValueStrict · SENTRY_DSN_PATTERN · SENTRY_ORG_PATTERN · SENTRY_SETTINGS_CACHE_KEY · sentryDsnProblem · sentryRelease · sentrySink · signatureTags

And 32 types.

@marktiderman/genesis-native/devtools

Other exports (9)

buildDebugInfo · createDevtools · createHoldDetector · createShakeDetector · DEFAULT_DEVTOOLS_CHECK_LABELS · DEVTOOLS_BLOCK_ID · DEVTOOLS_SETTING_SPECS · devtoolsSettings · devtoolsSettingValues

And 17 types.

@marktiderman/genesis-native/web-handoff

Other exports (2)

openOnWeb · signOutOnWeb

And 4 types.

@marktiderman/genesis-native/dev-warnings

Other exports (2)

ignoreKnownDependencyWarnings · KNOWN_DEPENDENCY_WARNINGS

And 1 types.