CSFrequency/react-firebase-hooks

useDocumentData returns undefined on first render until forced browser refresh returns data

Kylescottw opened this issue · 0 comments

Using latest next "next": "13.4.4",
reference ticket: #252

const queryRef = query(
    collection(db, "tournaments"),
    orderBy("date"),
    where("date", ">", timeStamp),
    limit(1)
  );

  const [tournaments, loadingTournaments, errorTournaments] = useCollectionOnce(
    queryRef,
    {
      snapshotListenOptions: { includeMetadataChanges: true },
    }
  );