Currently, I am utilizing typescript alongside the react-navigation library within my react-native project. Following the guidelines provided in the official documentation, I have been annotating my screens.
One issue I have encountered is the repetitive nature of the types I have created. Is there a method to make these types more dynamic, allowing me to simply input the screen name rather than redefining all types repeatedly?
Below is the code snippet used for annotating my screen. I am looking for a way to make the "landing" string adaptable based on each screen. I hope this explanation makes sense.
type LandingProps = CompositeScreenProps<
NativeStackScreenProps<HomeStackParamList, "landing">,
DrawerScreenProps<AppDrawerParamList>
>;