Getting weird response from react-query-firebase
Hello, I am using react-query-firebase set up like below:
import { QueryClient, QueryClientProvider} from "react-query";
const queryClient = new QueryClient();
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<QueryClientProvider client={queryClient} >
<App />
</QueryClientProvider>
);
const articleCollection = collection(firestore,"articles")
const q = query(articleCollection,limit(5))
const articles = useFirestoreInfiniteQuery("articles",q,(snapshot)=>{
const lastDoc = snapshot.docs[snapshot.docs.length-1]
return query(articleCollection,startAfter(lastDoc))
})
VERSIONS:
"@react-query-firebase/auth": "^1.0.0-dev.2",
"@react-query-firebase/firestore": "^1.0.0-dev.7",
"firebase": "^9.12.1",
"react-query": "^3.39.2",
However, the data I get is something like below. As you can see in has weird keys and values, expanding these object gives other weird obects. In summary I never get the articles as a response. I would appreciate any insight that can help me get the right response. Please, if you need more information, let me know;
docs
:
Array(3)
0
:
rl :{_firestore: $a, _userDataWriter: hl, _key: ct, _document: Se, _converter: null, …}
1
:
rl :{_firestore: $a, _userDataWriter: hl, _key: ct, _document: Se, _converter: null, …}
2
:
rl :{_firestore: $a, _userDataWriter: hl, _key: ct, _document: Se, _converter: null, …}0 Replies