Comments (9)
from query.
I want to fix that in order to learn more about react-query, mind if you lead me on which part of the code should I look? Thanks!
from query.
Yes I can! But first, could you make a codesandbox that demonstrates the bug so we can work from there?
from query.
Well, I'm trying to mimic the issue using codesandbox, however without any success.
I'm starting to think that it happens because im in development mode in my react environment.
The issue I'm seeing is that the development environment catches the error and not react-query - only when I go out and in to the page.
I'm attaching a image that shows how it looks like.
from query.
Ah... yes. The redbox error handler for CRA dev mode is a bit overzealous sometimes. Let me look into this a bit more.
from query.
Just to be clear, are you by chance using Suspense?
from query.
from query.
So the cause of this error is that when then the window is refocused, the refetchAllQueries
function is called. This function returns a promise and will throw if any of the queries on the page error. So essentially, you don't want the window focus fetcher to throw error into the window, you want to catch the error and just log it to the console.
Let me know if that's enough info for you to get started on fixing it and feel free to open a PR. I'll help you the rest of the way with a code review there :)
from query.
Thanks for the help, I created a pull request and tested it on my application and it does work!
from query.
Related Issues (20)
- solid-query Hydration Mismatch on SSR from version 5.24.2+ HOT 1
- Depracted warnings when installing @tanstack/react-query@latest HOT 1
- Devtools Picture-in-Picture not Working With `shadowDOMTarget` HOT 4
- getQueryData suddenly returns undefined for a query even though no update to query data has occurred HOT 1
- useSuspenseQueries inference differ from useQueries inference HOT 2
- Redundant queries invalidation when combining `useQuery` with `fetchQuery` in v5 HOT 10
- Error is reset to null during invalidation HOT 2
- UI reflection using firebase in react-query is it possible in offline mode ? HOT 1
- i have firebase + react query and i want to show data offline HOT 5
- When using PersistQueryClient, staleTime on query is not respected HOT 1
- Cached data is sometimes lost HOT 3
- Solid Query hydrates wrong query key HOT 2
- codemod: ERR_REQUIRE_ESM when migrating from v4 to v5 HOT 1
- createQueries prevent SolidStart SSR page from loading
- invalidateQueries / refetchQueries / setQueryData on mutation success not triggering the rerender of all consumers HOT 1
- Solid Query: `reconcile` and `placeholderData` don't work together HOT 2
- React Query devtools restore loading action doesn't restore loading state, freezes tools HOT 6
- Combination of skipToken and useSuspenseQuery not working HOT 1
- Vite warnings when Sourcemaps are enabled HOT 1
- useInfiniteQuery breaks array order in get request and missing returned data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from query.