1handleChange(e: React.ChangeEvent<HTMLInputElement>) {
2 // No longer need to cast to any - hooray for react!
3 this.setState({temperature: e.target.value});
4 }
5
6 render() {
7 ...
8 <input value={temperature} onChange={this.handleChange} />
9 ...
10 );
11 }
1// onSubmit or handleSubmit
2handleSubmit(eventL FormEvent<HTMLFormElement>) {
3
4}