【发布时间】:2020-04-07 10:30:51
【问题描述】:
抱歉,如果标题具有误导性。我似乎找不到合适的标题。 我有两个班。
****************Form.tsx
interface Props{}
interface State{}
class Form extends Component<Props, State>{
protected submit(){
// contains a code when form submits
}
}
****************Login.tsx
class LoginForm extends Form{
render(){
return(
<View>
<Button onClick = {() => this.props.navigation.goBack()}
<Button onClick= {() => this.submit()} />
</View>
);
}
}
我想做这个
<LoginForm navigation = {someObject} />
但我不能这样做,因为我似乎找不到解决方法。我只是想知道如何将更多的道具传递给 LoginForm。
【问题讨论】:
标签: typescript react-native react-navigation