title: Upgrading to Cloud Functions v1.0 and I broke everything
body: <p>Trying to follow the instructions on <a href="https://firebase.google.com/docs/functions/beta-v1-diff#cloud-firestore" rel="nofollow noreferrer">this page</a> and I can't figure out how to simply get to the data in the DocumentSnapshot.</p>
  
  <p>They do not really explain updating onCreate, except to say it is the same as onDelete, and I can't get that to work.</p>
  
  <pre><code> exports.mFoo = functions.firestore
      .document('foos/{key}')
      .onCreate((snap, context) =&gt; { 
  
        const bar = snap.data(); // &lt;-- DOESN'T WORK
        console.log(bar); // &lt;-- DOESN'T WORK
  
      return Promise;
  });
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>TypeError: snap.data is not a function at
    exports.mFoo.functions.firestore.document.onCreate</p>
  </blockquote>
  
  <p>I'm sure it's super simple but I don't really understand this stuff and I have tried tons of combinations of stuff and nothing works.</p>