Contact Manager | Add Person Form

PHOTO EMBED

Sat Apr 17 2021 19:48:07 GMT+0000 (Coordinated Universal Time)

Saved by @Ivan2u #react.js

function AddPersonForm() {
  const [ person, setPerson ] = useState("");

  function handleChange(e) {
    setPerson(e.target.value);
  }

  function handleSubmit(e) {
    e.preventDefault();
  }
  return (
    <form onSubmit={handleSubmit}>
    <input type="text" 
    placeholder="Add new contact" 
    onChange={handleChange} 
    value={person} />
    <button type="submit">Add</button>
    </form>
    );
}
content_copyCOPY

https://www.sololearn.com/learning/1097/3381/7655/1