diff --git a/src/App.js b/src/App.js index d7c9417..858881c 100644 --- a/src/App.js +++ b/src/App.js @@ -63,7 +63,7 @@ function SignOut() { function ChatRoom() { const dummy = useRef(); const messagesRef = firestore.collection('messages'); - const query = messagesRef.orderBy('createdAt').limit(25); + const query = messagesRef.orderBy('createdAt').limitToLast(25); const [messages] = useCollectionData(query, { idField: 'id' });