Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Cannot add headerTitle from options in Tabs.Screen in React navigation, I don't get TypeScript comment

$
0
0

I want to render a CustomHeader component via options in Tabs.Screen in React Navigation but TypeScript show me an error indicating connection to ParamList.The issue description from TypeScript :Type '{ headerTitle: () => JSX.Element; }' is not assignable to type 'BottomTabNavigationOptions | ((props: { route: RouteProp<BottomTabsParamList, "Wykonam">; navigation: any; }) => BottomTabNavigationOptions) | undefined'.Object literal may only specify known properties, and 'headerTitle' does not exist in type 'BottomTabNavigationOptions | ((props: { route: RouteProp<BottomTabsParamList, "Wykonam">; navigation: any; }) => BottomTabNavigationOptions)'.ts(2322)types.d.ts(271, 5): The expected type comes from property 'options' which is declared here on type 'IntrinsicAttributes & RouteConfig<BottomTabsParamList, "Wykonam", TabNavigationState<Record<string, object | undefined>>, BottomTabNavigationOptions, BottomTabNavigationEventMap>'

And here is how my BorromTabsParamList looks like. How should I modify it ?

export type BottomTabsParamList = { Wykonam: undefined; Zlecę: undefined; Wiadomości: undefined; Dodaj: undefined; Więcej: undefined; };

thanks for help !


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>