Apologies if the title is confusing. I am struggling to come up with a suitable heading. I have two classes.
****************Form.tsx
interface Props{}
interface State{}
class Form extends Component<Props, State>{
protected submit(){
// includes code for form submission
}
}
****************Login.tsx
class LoginForm extends Form{
render(){
return(
<View>
<Button onClick = {() => this.props.navigation.goBack()}
<Button onClick= {() => this.submit()} />
</View>
);
}
}
I want to achieve this
<LoginForm navigation = {someObject} />
But I'm unable to do so as I haven't found a workaround yet. I simply want to learn how to pass additional props to LoginForm.