title: In react, how does one update data in firebase?
body: <p>As a new react programmer, I'm struggling to update my form data in firebase. Please assist.</p>
  
  <p>Here's my button:</p>
  
  <pre><code>&lt;button onSubmit={() =&gt; this.handleSubmit(this.props.match.params.id)}&gt;
    Update
  &lt;/button&gt;
  </code></pre>
  
  <p>And here's the handler:</p>
  
  <pre><code>handleSubmit = (id) =&gt; {
    console.log(id);
    return this.props.firestore
    .collection("tasks")
    .doc(id)
    .update({
      title: this.props.title
    })
    .then(data =&gt; console.log(data))
    .catch(err =&gt; {
      console.log(err);
    });
  };
  </code></pre>
  
  <p>Once submitted, although I get no error, I also don't get the id logged to the console. It's like nothing really happens.</p>