Hard
class MyForm extends React.Component{
constructor(props){
super(props);
this.state={username: 'default name'};
}
render(){
return(
<form method="POST"action="/some/url">
<label htmlFor="username">Your name:</label>
<input type="text"name="username" id="username" value={this.state.username} />
<button type="submit">SAVE</button>
</form>
)
}
}
Check the valid proposal(s):
Author: Victor SabatierStatus: PublishedQuestion passed 1543 times
Edit
7
Community EvaluationsNo one has reviewed this question yet, be the first!
4
Fix the following React component: Scroller7
Improve this React component so that it displays "Green" by default.3
Write the missing code to render the children of the UserProfile component.3
Save the state used to display the selected page in a React component.6
Write a React function that fetches comments and passes them to a component.3
Write a React component as a function7
Optimize a React component by implementing shouldComponentUpdate