-
Notifications
You must be signed in to change notification settings - Fork 323
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 React Compiler lints + improve performance #11450
Conversation
@MrFlashAccount lints refactored out |
|
1 similar comment
|
@@ -56,7 +56,7 @@ declare module '@tanstack/query-core' { | |||
/** Query Client type suitable for shared use in React and Vue. */ | |||
export type QueryClient = vueQuery.QueryClient | |||
|
|||
const DEFAULT_QUERY_STALE_TIME_MS = 2 * 60 * 1000 | |||
const DEFAULT_QUERY_STALE_TIME_MS = Infinity |
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.
Does it mean that we never update queried data? It may be a problem for our cloud browser, which won't be refreshed after putting a new file to cloud directory.
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.
It's a temporary solution to avoid ton of setTimeout calls during subscribe
Instead of setting stale time we now have a query that mark all queries as stale each 2 minutes.
Worth noting that marking query as stale doesn't mean that it will be refetched immidiately.
Also if we use the same cache and queries across dashboard and project-view, we'll have a consistent state between vue and react
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.
More contex is here: https://x.com/mrflashaccount/status/1857881760110952926?s=46
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.
Instead of setting stale time we now have a query that mark all queries as stale each 2 minutes.
Then it's a good idea to leave comment about it here.
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.
We'll remove it once react-query landed a fix (they already opened a PR)
🧪 Storybook is successfully deployed!📊 Dashboard:
|
Pull Request Description
Depends on:
Fix React Compiler lints
Important Notes
None
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
The documentation has been updated, if necessary.Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
Unit tests have been written where possible.or the Snowflake database integration, a run of the Extra Tests has been scheduled.