title: update values in react form input fields
body: <p>I am new to react and I can fetch the result from form input fields. Now I need to update those values and submit to the backend. I am struggling to find a way to pass all the input field values at once.</p>
  
  <pre class="lang-jsx prettyprint-override"><code>constructor(props) {
      super(props);
      this.state = {
          items: [],
          isLoaded: false,
          data: this.props.location.data
      };
  }
  
  render() {
      return (
          &lt;div&gt;
              &lt;h2&gt;Update Your Profile&lt;/h2&gt;
              {items.map(item =&gt; (
                  &lt;Form key={item.uId} onSubmit={this.handleSubmit}&gt;
                          &lt;label&gt;User Name&lt;/label&gt;
                          &lt;input type="text" defaultValue={item.userName}&gt;&lt;/input&gt;
                          &lt;label&gt;Email address&lt;/label&gt;
                          &lt;input type="email" defaultValue={item.email}&gt;&lt;/input&gt;
                      &lt;/div&gt;
                      &lt;button type="submit" &gt;Update&lt;/button&gt;
                  &lt;/Form&gt;
              ))}
          &lt;/div&gt;
      );
  }
  
  handleSubmit = (e) =&gt; {
      e.preventDefault();
      axios.put('http://localhost:3000/api/user/' + this.state.data, this.state.items).then(response =&gt; {
          //
      });
  };
  </code></pre>
  
  <p>My API call looks like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>app.put('/api/user/:userId', (req, res, err) =&gt; {
      User.update(
          { userName: req.body.userName, email: req.body.email },
          {
              where: {
                  userId: req.params.userId
              }
          }
      ).then(function (rowsUpdated) {
          res.json(rowsUpdated)
      }).catch(err);
  });
  </code></pre>
  
  <p>How can I modify this code to set a value for <code>this.state.items</code> with all the updated fields values and submit it?</p>