Open SvenDowideit opened 2 years ago
for react-query v3 - https://react-query-v3.tanstack.com/guides/disabling-queries
but v4 is soon, and has https://tanstack.com/query/v4/docs/examples/react/offline which will be superior.
IMO this can wait til 0.5.0, as its not a regression - but ... if you're not connected, you will (currently) see:
Failed to load resource: net::ERR_CONNECTION_REFUSED 127.0.0.1:8899/:1 Failed to load resource: net::ERR_CONNECTION_REFUSED query.js:356 TypeError: Failed to fetch at ClientBrowser.callServer (connection.ts:1115:23) at ClientBrowser.request (index.js:102:8) at connection.ts:1154:14 at new Promise (<anonymous>) at Connection._rpcRequest (connection.ts:1153:12) at Connection.getParsedTokenAccountsByOwner (connection.ts:2725:34) at getTokenAccounts (getAccount.ts:155:39) at Object.queryTokenAccounts [as queryFn] (getAccount.ts:170:31) at Object.fetchFn2 [as fn] (query.js:298:29) at run2 (retryer.js:95:31) onError @ query.js:356 reject2 @ retryer.js:67 (anonymous) @ retryer.js:132 127.0.0.1:8899/:1 Failed to load resource: net::ERR_CONNECTION_REFUSED query.js:356 TypeError: Failed to fetch at ClientBrowser.callServer (connection.ts:1115:23) at ClientBrowser.request (index.js:102:8) at connection.ts:1154:14 at new Promise (<anonymous>) at Connection._rpcRequest (connection.ts:1153:12) at Connection.getParsedAccountInfo (connection.ts:2818:34) at getParsedAccount (getAccount.ts:47:36) at Object.queryParsedAccount [as queryFn] (getAccount.ts:76:29) at Object.fetchFn2 [as fn] (query.js:298:29) at run2 (retryer.js:95:31) onError @ query.js:356 reject2 @ retryer.js:67 (anonymous) @ retryer.js:132 connection.ts:1115 POST http://127.0.0.1:8899/ net::ERR_CONNECTION_REFUSED (anonymous) @ connection.ts:1115 ClientBrowser.request @ index.js:102 (anonymous) @ connection.ts:1154 (anonymous) @ connection.ts:1153 getEpochInfo @ connection.ts:3345 validatorState @ ValidatorNetwork.tsx:22 (anonymous) @ ValidatorNetwork.tsx:35 commitHookEffectListMount @ react-dom.development.js:23150 commitPassiveMountOnFiber @ react-dom.development.js:24926 commitPassiveMountEffects_complete @ react-dom.development.js:24891 commitPassiveMountEffects_begin @ react-dom.development.js:24878 commitPassiveMountEffects @ react-dom.development.js:24866 flushPassiveEffectsImpl @ react-dom.development.js:27039 flushPassiveEffects @ react-dom.development.js:26984 commitRootImpl @ react-dom.development.js:26935 commitRoot @ react-dom.development.js:26682 performSyncWorkOnRoot @ react-dom.development.js:26117 flushSyncCallbacks @ react-dom.development.js:12042 (anonymous) @ react-dom.development.js:25651 connection.ts:1115 POST http://127.0.0.1:8899/ net::ERR_CONNECTION_REFUSED
for react-query v3 - https://react-query-v3.tanstack.com/guides/disabling-queries
but v4 is soon, and has https://tanstack.com/query/v4/docs/examples/react/offline which will be superior.
IMO this can wait til 0.5.0, as its not a regression - but ... if you're not connected, you will (currently) see: