You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: when using query.isLoading in one of components during the initial load and on hot reload im getting the below error:
"Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey, need your help on this one.
Issue: when using query.isLoading in one of components during the initial load and on hot reload im getting the below error:
"Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?"
Versions:
"expo": "~51.0.28",
"@react-navigation/native": "^6.0.2",
"@tanstack/react-query": "^5.59.15",
`import { useQuery } from "@tanstack/react-query";
import { getAppointments } from "../api/api";
export const useGetAppointments = () => {
return useQuery({
queryKey: ["getAppointments"],
queryFn: getAppointments,
retry: 3,
retryDelay: 3000
})
};`
`export default function UpcomingAppointments() {
const getAppointmentsQuery = useGetAppointments();
....
return (
{getAppointmentsQuery.isLoading || loading ? (
<ActivityIndicator size={"large"} color={theme.colors.primary} />
) : (
mainComponent()
)}
);`
if i remove "getAppointmentsQuery.isLoading" then im not getting any errors. Could you please help me regarding this.
thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions