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

Merging CompositeScreenProps into BottomTabScreenProps

$
0
0
type HomeTabParamList = {  Chats: undefined;  Contacts: undefined;  Profile: undefined;};

How do u merge

type ContactsScreenProps = CompositeScreenProps<  BottomTabScreenProps<HomeTabParamList, 'Contacts'>,  StackScreenProps<RootStackParamList>>;

into

export type HomeTabScreenProps<RouteName extends keyof HomeTabParamList> =  BottomTabScreenProps<HomeTabParamList, RouteName>;

?

I'm aware you can also just use ContactsScreenProps as the props for that screen. Just want to know if it's possible to reinject it into HomeTabScreenProps for a unified API


Viewing all articles
Browse latest Browse all 6287

Trending Articles



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