Giter Club home page Giter Club logo

Comments (8)

jagthedrummer avatar jagthedrummer commented on August 23, 2024 6

Would also appreciate a merge and release.

from react-query-firebase.

rizooooo avatar rizooooo commented on August 23, 2024 2

While waiting for this fix, I created a temporary custom hook. :)

Screenshot 2023-02-03 at 1 38 18 PM

Screenshot 2023-02-03 at 1 37 57 PM

from react-query-firebase.

PatrikTheDev avatar PatrikTheDev commented on August 23, 2024

Also noticed this, happens with RTDB as well. It does return once an update to the DB occurs though. I'm guessing some interaction with React Query regarding the updates isn't right

from react-query-firebase.

bgalek avatar bgalek commented on August 23, 2024

any chances for a merge? :)

from react-query-firebase.

KarikoGoat avatar KarikoGoat commented on August 23, 2024

I am also experiencing the same problem, so it would be very appriciated if it got fixed

from react-query-firebase.

martsim6 avatar martsim6 commented on August 23, 2024

would be nice to have this fix merged. I rewrote whole app to use-query-firebase and now due this I have to rewrite it back or use custom logic when need to subscribe to document changes...

Please, make it work. Thanks!

from react-query-firebase.

Banfanci avatar Banfanci commented on August 23, 2024

For getting multiple docs like useFirestoreQuery

import { DocumentData, getDocs, onSnapshot, Query } from "firebase/firestore"
import { useEffect } from "react"
import { useQuery } from "react-query"

interface IProps {
   keyName: Partial<string[]>
   query: Query<DocumentData>
   subscribe?: boolean
}

export const useCustomFireStoreQuery = ({ keyName, query, subscribe = false }: IProps) => {
   const getQuery = useQuery(keyName, async () => {
       const snapshot = await getDocs(query)
       return snapshot
   })
   useEffect(() => {
       if (subscribe) {
           const unsub = onSnapshot(query, (doc) => {
               getQuery.refetch()
           })
           return () => unsub()
       }
   }, [subscribe, query])
   return getQuery
}

from react-query-firebase.

kabtamu-degifie avatar kabtamu-degifie commented on August 23, 2024

The issues regarding infinite loading and disabled functionality associated with the useFirestoreDocumentData hook have been resolved. Therefore, we can now utilize it with Next.js versions 13 or 14.
#97

from react-query-firebase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.