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
No idea why this happens, but when I tried to implement react-scan in my React Native / Expo project, I get this error in reference to @tanstack/react-query set-up. When I remove the scan() method from the _layout file, the error goes away. Strange. Appreciate your work on this and excited to use it in the future!
Error: No QueryClient set, use QueryClientProvider to set one
My _layout file looks like this:
import { scan } from "react-scan";
import React, { useEffect, useState } from "react";
scan({
enabled: process.env.NODE_ENV === "development",
log: true, // logs render info to console (default: false)
clearLog: false, // clears the console per group of renders (default: false)
});
export const Providers = () => {
const [queryClient] = useState(
() => new QueryClient(DEFAULT_QUERY_CLIENT_OPTIONS),
);
return (
<ConfigProvider config={{ ...config, supabase, nanoid }}>
<StatusBar style="dark" />
<QueryClientProvider client={queryClient}>
{...more providers and the main UI layout}
</QueryClientProvider>
</ConfigProvider>
);
};
export default Sentry.wrap(Providers);
The text was updated successfully, but these errors were encountered:
@aidenybai are you planning to support React Native some time in the future?
also, if you attempted to support, what were main issues/blockers? it'd be good to know if somebody were to consider contributing towards React Native support :)
No idea why this happens, but when I tried to implement react-scan in my React Native / Expo project, I get this error in reference to @tanstack/react-query set-up. When I remove the
scan()
method from the _layout file, the error goes away. Strange. Appreciate your work on this and excited to use it in the future!Error: No QueryClient set, use QueryClientProvider to set one
My _layout file looks like this:
The text was updated successfully, but these errors were encountered: