Skip to content

Commit

Permalink
Finalized demonstration of react to angular implementation.
Browse files Browse the repository at this point in the history
Kyle and I discussed the use/standard of multiple handling.
  • Loading branch information
jruzekowicz committed Jul 20, 2021
1 parent c6d3eed commit 8da04fb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions www/components/itinerum_tutorial/Tutorial.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,21 @@ class TutorialComponent extends React.Component {
lname: this.props.schema.lname
}
};
this.handleChange = this.handleChange.bind(this);
this.handlefnameChange = this.handlefnameChange.bind(this);
this.handlelnameChange = this.handlelnameChange.bind(this);
}
handleChange(event) {
handlefnameChange(event) {
this.setState({
schema: {
fname: event.target.value,
lname: this.state.schema.lname
}
});
}
handlelnameChange(event) {
this.setState({
schema: {
fname: this.state.schema.fname,
lname: event.target.value
}
});
Expand All @@ -33,7 +42,8 @@ class TutorialComponent extends React.Component {
Last Name -> {this.state.schema.lname}
</div>
<div>
<input type="text" value={this.state.schema.fname} onChange={this.handleChange} />
<input type="text" value={this.state.schema.fname} onChange={this.handlefnameChange} />
<input type="text" value={this.state.schema.lname} onChange={this.handlelnameChange} />
</div>
<div className="row">
{/* bootstrap grid as margin */}
Expand Down

0 comments on commit 8da04fb

Please sign in to comment.