Skip to content

Instantly share code, notes, and snippets.

@bhupendra-nitt
Created April 12, 2019 05:40
Show Gist options
  • Save bhupendra-nitt/10776644834fdeebb3f97a1704167a66 to your computer and use it in GitHub Desktop.
Save bhupendra-nitt/10776644834fdeebb3f97a1704167a66 to your computer and use it in GitHub Desktop.
return (
<div>
<div>Name: {name}</div>
<div>Age: {age}</div>
<input value={name} onChange={(e) => setName(e.target.value)}/>
<input value={age} onChange={(e) => setAge(e.target.value)}/>
<button onClick={handleSubmit}>Submit</button>
<div style={{color: 'red' }}>
{error.message}
</div>
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment