Comments (8)
Would also appreciate a merge and release.
from react-query-firebase.
While waiting for this fix, I created a temporary custom hook. :)
from react-query-firebase.
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.
any chances for a merge? :)
from react-query-firebase.
I am also experiencing the same problem, so it would be very appriciated if it got fixed
from react-query-firebase.
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.
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.
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)
- Is this repo still being worked on... HOT 5
- How to write tests for this hooks using Jest/RTL?
- 1.0.0-dev7: useFirestoreDocumentData does not update invalidated data (react 18.2.0, react-query 3.39.2) HOT 1
- Dependent Queries HOT 2
- Uncaught ReferenceError: Cannot access 'query' before initialization HOT 3
- How do I pass variables to hooks? HOT 2
- Dependency issue HOT 1
- TypeError: can't access property "delete", _firebase_util__WEBPACK_IMPORTED_MODULE_0__.getModularInstance(...) is undefined HOT 1
- useFirestoreQuery() - duplicate firebase SDK HOT 1
- Can this package be used with react native? authentication does not pick up google login
- NextJS 13 - Auth Checking is not working as expected HOT 1
- useFirestoreInfiniteQuery() - data.page is null or undefined when refreshing page HOT 1
- useAuthUser works only for the first execution in react native HOT 2
- Enabled option error HOT 1
- Can not pass mutation of useAuthSignOut as dependencies of useEffect
- Maintainers? HOT 3
- firebase v10 HOT 2
- How can I perform nested collection queries?
- [FR] Support Firebase JS SDK v10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-query-firebase.