I am trying to use react native navigation using typescript and I am getting a Type 'typeof LoginScreen' is not assignable to type 'ComponentType<any>'
error when trying to connect my screens.
class App extends React.Component { render() { return (<NavigationContainer><Stack.Navigator initialRouteName="Login"><Stack.Screen name="Login" component={LoginScreen} /></Stack.Navigator></NavigationContainer> ); }}class LoginScreen extends React.Component { render() { const {navigate} = this.props.navigation; }}
This fails at component={LoginScreen}. I understand that it is because my React component 'HomeScreen' isn't expecting any props, however what is the safe way of handling this issue, as I saw many different solutions.