In my React Native project I have multiple screens, every screen I have to import these types and set is as props type in my screen over and over again.
import { RouteProp } from '@react-navigation/native'import { StackNavigationProp } from '@react-navigation/stack'import { NavigatorParameters } from '../references/types/navigators'type PropsType = { navigation: StackNavigationProp<NavigatorParameters, 'ChangeData'>, route: RouteProp<NavigatorParameters, 'ChangeData'>}function ChangeData({ navigation, route }: PropsType) {
Can it be more be simplified into like this? So from that I can only import one type only
import ScreenPropsPatternType from '../references/types/screen-props-pattern'function ChangeData({ navigation, route }: ScreenPropsPatternType<'ChangeData'>) {