title: Decrease document reads in Firestore, react app
body: <p>I am building a chat app in react using Firebase Firestore as backend database.</p>
  <p>I get recent 25 messages in useEffect hook as</p>
  <pre><code>useEffect(() =&gt; {
      const q = query(
          collection(db, 'messages'),
          orderBy('createdAt', 'desc'),
          limit(25)
      );
  
      return onSnapshot(q, (snapshot) =&gt; {
          setData(
              snapshot.docs.map((doc) =&gt; {
                  console.log('document read');
                  return { ...doc.data(), id: doc.id };
              })
          );
      });
  }, []);
  </code></pre>
  <p>But this operation results in 25 document reads on page load and 50 additional on sending a message.
  If more users are connected, 25 request per user happen on single message send by any user.
  Is there any way to reduce the reads?</p>
  <p>Complete code:- <a href="https://github.com/Puneet56/Converse" rel="nofollow noreferrer">https://github.com/Puneet56/Converse</a></p>