Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncaught Error: No QueryClient set, use QueryClientProvider to set one #169

Open
Osub opened this issue Jun 24, 2023 · 0 comments
Open

ncaught Error: No QueryClient set, use QueryClientProvider to set one #169

Osub opened this issue Jun 24, 2023 · 0 comments

Comments

@Osub
Copy link

Osub commented Jun 24, 2023

const root = ReactDOM.createRoot(
    document.getElementById('wallet-login') as HTMLElement
);


root.render(
    <React.StrictMode>
        <QueryClientProvider client={queryClient}>
            <SIWEProvider {...siweConfig}
                          enabled={true}
                          nonceRefetchInterval={1000}
                          sessionRefetchInterval={10000}
                          signOutOnDisconnect={true}
                          signOutOnAccountChange={true}
                          signOutOnNetworkChange={true}
                          onSignIn={(data) => console.log(data)}
                          onSignOut={() => console.log('signed out')}
            >
                <ConnectKitProvider>
                    <App />
                </ConnectKitProvider>
            </SIWEProvider>
        </QueryClientProvider>
    </React.StrictMode>
);
ncaught Error: No QueryClient set, use QueryClientProvider to set one
    at useQueryClient (QueryClientProvider.tsx:49:5)
    at useBaseQuery2 (index.js:166:23)
    at useQuery2 (index.js:305:21)
    at SIWEProvider (index.es.js:2704:19)
    at renderWithHooks (react-dom.development.js:16305:18)
    at mountIndeterminateComponent (react-dom.development.js:20074:13)
    at beginWork (react-dom.development.js:21587:16)
    at HTMLUnknownElement.callCallback2 (react-dom.development.js:4164:14)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:16)
    at invokeGuardedCallback (react-dom.development.js:4277:31)
react-dom.development.js:18687 The above error occurred in the <SIWEProvider> component:

    at SIWEProvider (http://127.0.0.1:5173/node_modules/.vite/deps/chunk-7KELGAXU.js?v=bea6d06d:26277:23)
    at QueryClientProvider (http://127.0.0.1:5173/node_modules/.vite/deps/react-query.js?v=bea6d06d:2509:3)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
logCapturedError @ react-dom.development.js:18687
react-dom.development.js:26923 Uncaught Error: No QueryClient set, use QueryClientProvider to set one
    at useQueryClient (QueryClientProvider.tsx:49:5)
    at useBaseQuery2 (index.js:166:23)
    at useQuery2 (index.js:305:21)
    at SIWEProvider (index.es.js:2704:19)
    at renderWithHooks (react-dom.development.js:16305:18)
    at mountIndeterminateComponent (react-dom.development.js:20074:13)
    at beginWork (react-dom.development.js:21587:16)
    at beginWork$1 (react-dom.development.js:27426:14)
    at performUnitOfWork (react-dom.development.js:26557:12)
    at workLoopSync (react-dom.development.js:26466:5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant