-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fixed the dashboard tile loading issue (#344) #346
Conversation
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.
Let's implement react-query like everywhere else in this project.
This behavior is handled internally in react-query.
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.
If we use react-query, why'd we still need to perform abort on signal ?
react-query will internally cancel the queries. React Query will stop handling the response from the previous query, but it doesn't automatically cancel the underlying network request. To explicitly cancel the request over network. I had to use cc: @balaji-jr |
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.
Leaving it to react query wont do any harm neither does it improve performance by cancelling requests. Please remove the abort controller implementation.
AbortController seems like a cleaner approach here right. Basically it cleanly stops any overhead related to the request. If this doesn't have any overhead, why remove it? |
@nitisht In addition to the above ^, |
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.
Now there are two sources of truth for the tile data. The dashboard store and the useQuery. Lets use the data from the store in the tile since we use the same in edit form / exports etc.
No description provided.