我有一个文件,并且在this.state {}中定义了一个名为“ approve”的变量。
class cd extends React.Component { constructor() { super(); this.state = { approve: "", }; this.handleA = this.handleApprove.bind(this); } handleA(e) { console.log(e.target.value); this.setState({ approve: e.target.value }); } render() { const { approve } = this.state; const { } = this.props; console.log(approveState); return ( <Card> <CardHeader title="Name" /> <CardContent> <Field name="Name" component={RenderText} label="" /> </CardContent> </Card>)
我需要将其传递到另一个js文件。...
如何将批准的值传递给此js文件
我有一个文件,并且在this.state {}类中定义了一个名为“ approve”的变量。cd扩展React.Component {Constructor(){super(); this.state = {批准:“”,}; ...
如果当前设置为: