Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
<Route path="/" component={UserHome}> <Route path="newPatient" component={NewPatient}></Route> </Route>
constructor(...args) { super(...args); this.state = { form: <First/> }; } {this.state.form} <Button onClick={() => this.setState({ form: <Second/> })} >Create a new Patient</Button>
getFormData() { var data = { name: this.refs.name.getValue(), mail: this.refs.mail.getValue(), text: this.refs.text.getValue() }; this.handleSubmit(data); },
<MyContactForm {...this.props} />