Obtenez toutes les données dans Collection Firebase React

 const [driverBookings, setdriverBookings] = useState([]);
  useEffect(() => {
    db.collection("driverBookings").onSnapshot((snapshot) => {
      let driverBooking = snapshot.docs.map((doc) => ({
        ...doc.data(),
        id: doc.id,
      }));

      setdriverBookings((prev) => [...prev, ...driverBooking]);
    });
Niraj Kafle