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
import{QueryErrorResetBoundary}from'@tanstack/react-query';import{Suspense,useRef}from'react';import{ErrorBoundary}from'react-error-boundary';importDataListfrom'../src/components/DataList';importLoadingfrom'../src/components/Loading';import{QueryClient,QueryClientProvider}from'@tanstack/react-query';/** Add your relevant code here for the issue to reproduce */exportdefaultfunctionHome(){constqueryClientRef=useRef<QueryClient>();if(!queryClientRef.current){queryClientRef.current=newQueryClient({defaultOptions: {queries: {retry: false,suspense: true,useErrorBoundary: true,cacheTime: 1000*60*5,staleTime: 1000*60*3}}});}return(<QueryClientProviderclient={queryClientRef.current}><QueryErrorResetBoundary>{({ reset })=>(<ErrorBoundaryonReset={reset}fallbackRender={({ resetErrorBoundary })=>(<div>
There was an error!
<buttononClick={()=>resetErrorBoundary()}>Try again</button></div>)}><Suspensefallback={<Loading/>}><DataList/></Suspense></ErrorBoundary>)}</QueryErrorResetBoundary></QueryClientProvider>);}
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.
Verify canary release
Provide environment information
What browser are you using? (if relevant)
Chrome 107.0.5304.110
How are you deploying your application? (if relevant)
not deployed
Describe the Bug
I'm using reacdt query + next for suspense
I tried dynamic import and setting off ssr option
I think this error is caused by suspense did not read next.config rewrites paths
How can i solve it?
Expected Behavior
I don't want to see Invalid URL
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/ww8007/next_issue
To Reproduce
React Query setting
next.config.js
Code
The text was updated successfully, but these errors were encountered: