> In SDK 56 and later, Expo Router no longer supports importing from external @react-navigation/* packages in application code. https://docs.expo.dev/router/migrate/sdk-55-to-56/ ```patch import { DarkTheme as NavigationDarkTheme, DefaultTheme as NavigationDefaultTheme, - } from '@react-navigation/native'; + } from "expo-router/react-navigation"; import { adaptNavigationTheme } from 'react-native-paper'; const { LightTheme, DarkTheme } = adaptNavigationTheme({ reactNavigationLight: NavigationDefaultTheme, reactNavigationDark: NavigationDarkTheme, }); ``` This will result in a TypeScript type mismatch.
Activity
gavinliu commentedon May 28, 2026
import { DarkTheme as NavigationDarkTheme, DefaultTheme as NavigationDefaultTheme, - } from '@react-navigation/native'; + } from "expo-router/react-navigation"; import { adaptNavigationTheme } from 'react-native-paper'; const { LightTheme, DarkTheme } = adaptNavigationTheme({ - reactNavigationLight: NavigationDefaultTheme, - reactNavigationDark: NavigationDarkTheme, + reactNavigationLight: NavigationDefaultTheme as any, + reactNavigationDark: NavigationDarkTheme as any, });AI Fix