title: How can I store and update multiple values in React useState?
body: <p>I've a series of user data elements which I'm collecting inside a React component using hooks.</p>
  
  <pre><code>const [mobile, setMobile] = useState('');
  const [username, setUsername] = useState('');
  const [email, setEmail] = useState('');
  const [password, setPassword] = useState('');
  const [confirmPassword, setConfirmPassword] = useState('');
  </code></pre>
  
  <p>Each of these are updated as follows.</p>
  
  <pre><code>&lt;input type="text"
         className="form-control"
         id="mobile"
         placeholder="Enter a valid mobile number"
         onChange={event =&gt; {setMobile(event.target.value)}}/&gt;
  </code></pre>
  
  <p>Is there a more succint way to do this using an object as the variable?</p>