Viktor Shevchenko
Web developer from Kyiv
Kristijan Ristovski
(
Alexander Solovyov
(piranha)
You have made something, and it works. You find it awesome, but still not sure if this is right...
React Alicante 2018
Go and tell how to use it...
Somewhere, someday 2018
Engineering Manager at GlobalLogic
@vict-shevchenko
@vict_shevchenko
@victorshevchenko
class NameForm extends React.Component {
constructor(props) {
super(props);
this.state = {firstName: ''};
}
handleChange = (event) => {
this.setState({firstName: event.target.value});
}
render() {
return (
<form>
<label>
Name:
<input type="text" value={this.state.firstName} onChange={this.handleChange} />
</label>
<input type="submit" value="Submit" />
</form>
);
}
}
class NameForm extends React.Component {
constructor(props) {
super(props);
this.state = {name: '', age: ''};
}
handleNameChange = (event) => {
this.setState({name: event.target.value});
}
render() {
return (
<form>
<label>
Name:
<input type="text" value={this.state.name} onChange={this.handleNameChange} />
</label>
<input type="submit" value="Submit" />
</form>
);
}
}
<input type="text" value={this.state.age} onChange={this.handAgeChange} />
handleAgeChange = (event) => {
this.setState({age: event.target.value});
}
handleChange = (event) => {
this.setState({[event.target.name]: event.target.value});
}
<input type="text" name="name" value={this.state.name} onChange={this.handleChange} />
<input type="text" name="age" value={this.state.age} onChange={this.handleChange} />
To develop a form management library with built-in validation for React and MobX applications in TypeScript
At first, there was an
npm install reactive-mobx-form
By Viktor Shevchenko