-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
fix(web): Stop fetching context data on window focus #5568
Conversation
❌ Deploy Preview for novu-design failed. Why did it fail? →
|
✅ Deploy Preview for dev-web-novu ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Everytime the window gets focus, six requests are triggered to fetch orgs, users, changes, subscriptions, etc...
8cf2a87
to
274adf7
Compare
@@ -20,7 +20,6 @@ const queryClient = new QueryClient({ | |||
queries: { | |||
queryFn: defaultQueryFn as any, | |||
refetchOnWindowFocus: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refetch on window focus is already disabled on this line, it’s not clear what this change is achieving by removing the retry option. Could you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ignore. This change was pushed as part of the PW migration.
What changed? Why was the change needed?
Every time the window gets focused, six requests are triggered to fetch orgs, users, changes, subscriptions, etc...
Screenshots
<img width="624" alt="Screenshot 2024-05-14 at 18 37 02" src="https://github.com/novuhq/novu/assets/1352422/64260d02-622a-4910-b3e9-0e3a6584f500"