<!– These are the search querries for the React.js libraries –>
<!– Load React API –>
<!– Load React DOM–>
<!– Load Babel Compiler –>
Emerging Web Technology Final Project
This poll is a real poll, not just a propaganda vehicle. There are four choices, and the last one links to one of our blog-categories. Please answer the entire poll first with the first three choices, then go back and choose (up to) five questions to blog about- the ones most important to you. In the last space, tell us what you think we can do to make the poll better.
<!– This is a way to add a text area within React.js –>
<!– This is React.js code for a simple submit butten –>
class NameForm extends React.Component {
constructor(props) {
super(props);
this.state = {value: ”};
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
}
handleChange(event) {this.setState({value: event.target.value});}
handleSubmit(event) {
alert(‘A name was submitted: ‘ + this.state.value);
event.preventDefault();
}
render() {
return (
<formonSubmit={this.handleSubmit}>
<inputtype=“submit“ value=“Submit“ />
);
}
}
Recent Comments