title: Unhandled Rejection (TypeError): Cannot read property 'map' of undefined? (React-firebase)
body: <p>What is wrong in what i am doing, i am getting collection snapshot, looping through it and push it to the state then use that state to render some list items
  but i get that error:
  <code>Unhandled Rejection (TypeError): Cannot read property 'map' of undefined</code></p>
  <p><strong>Code:</strong></p>
  <pre><code>const [books, setBooks] = useState([]);
  db.collection('books').get()
     .then(snapshot =&gt; snapshot.forEach(doc =&gt; {
        setBooks([...books, doc.data()])
  }))
  
  return (
    books.map(return some jsx)
  )
  </code></pre>