Skip to content

Add a first-class expoRouterIntegration() with auto-registration #6156

@alwx

Description

@alwx

Today, Expo Router users have to wire up the generic reactNavigationIntegration themselves: import useNavigationContainerRef from expo-router, pass it through useEffect, and call navigationIntegration.registerNavigationContainer(ref). There is no Expo-Router-native integration.

The task here is to create a dedicated expoRouterIntegration() that:

  • Auto-detects expo-router (via require('expo-router') with try/catch, same idea as tryGetLinking in deeplink.ts).
  • Internally subscribes to the Expo Router navigation container without requiring the user to manage a ref.
  • Falls back gracefully if expo-router isn't installed (no-op, no warning spam).
  • Is registered automatically as part of the default integrations when Expo Router is detected (similar to how deeplinkIntegration is exported in integrations/exports.ts).

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions