Closed kemusa closed 2 years ago
I've implemented the following code:
and get this error: Type '{ children: Element[]; headerMode: string; initialRouteName: string; }' is not assignable to type 'IntrinsicAttributes & ((Pick<DefaultRouterOptions<string> & { children: ReactNode; screenOptions?: StackNavigationOptions | ((props: { ...; }) => StackNavigationOptions) | undefined; } & StackNavigationConfig, "children" | ... 2 more ... | "keyboardHandlingEnabled"> & { ...; }) | PropsWithChildren<...>)'. Type '{ children: Element[]; headerMode: string; initialRouteName: string; }' is missing the following properties from type 'Pick<DefaultRouterOptions<string> & { children: ReactNode; screenOptions?: StackNavigationOptions | ((props: { route: RouteProp<Record<string, object | undefined>, string>; navigation: any; }) => StackNavigationOptions) | undefined; } & StackNavigationConfig, "children" | ... 2 more ... | "keyboardHandlingEnabled">': mode, keyboardHandlingEnabled
Type '{ children: Element[]; headerMode: string; initialRouteName: string; }' is not assignable to type 'IntrinsicAttributes & ((Pick<DefaultRouterOptions<string> & { children: ReactNode; screenOptions?: StackNavigationOptions | ((props: { ...; }) => StackNavigationOptions) | undefined; } & StackNavigationConfig, "children" | ... 2 more ... | "keyboardHandlingEnabled"> & { ...; }) | PropsWithChildren<...>)'. Type '{ children: Element[]; headerMode: string; initialRouteName: string; }' is missing the following properties from type 'Pick<DefaultRouterOptions<string> & { children: ReactNode; screenOptions?: StackNavigationOptions | ((props: { route: RouteProp<Record<string, object | undefined>, string>; navigation: any; }) => StackNavigationOptions) | undefined; } & StackNavigationConfig, "children" | ... 2 more ... | "keyboardHandlingEnabled">': mode, keyboardHandlingEnabled
I'm using: Expo: ~42.0.1 React Navigation Shared Element: ^5.0.0-alpha1 React Native Shared Element: 0.7.0 React Navigation: v6
Turns out the version of React Native Shared Element was the issue. For some reason npm doesn't automatically install the latest. I fixed it by manually upgrading to version 3.1.3
I've implemented the following code:
and get this error:
Type '{ children: Element[]; headerMode: string; initialRouteName: string; }' is not assignable to type 'IntrinsicAttributes & ((Pick<DefaultRouterOptions<string> & { children: ReactNode; screenOptions?: StackNavigationOptions | ((props: { ...; }) => StackNavigationOptions) | undefined; } & StackNavigationConfig, "children" | ... 2 more ... | "keyboardHandlingEnabled"> & { ...; }) | PropsWithChildren<...>)'. Type '{ children: Element[]; headerMode: string; initialRouteName: string; }' is missing the following properties from type 'Pick<DefaultRouterOptions<string> & { children: ReactNode; screenOptions?: StackNavigationOptions | ((props: { route: RouteProp<Record<string, object | undefined>, string>; navigation: any; }) => StackNavigationOptions) | undefined; } & StackNavigationConfig, "children" | ... 2 more ... | "keyboardHandlingEnabled">': mode, keyboardHandlingEnabled
I'm using: Expo: ~42.0.1 React Navigation Shared Element: ^5.0.0-alpha1 React Native Shared Element: 0.7.0 React Navigation: v6