-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add ability to refetch a query in useQuery and useQueryWithStore #6130
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.
Looking forward to reading the documention!
loading: boolean; | ||
loaded: boolean; | ||
} => { | ||
): StateResult => { |
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.
rename to UseQueryWithStoreValue
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 would be a breaking change, right?
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.
Why? The type wasn't named or exported before this PR.
Co-authored-by: Francois Zaninotto <francois@marmelab.com>
UseQueryValue, | ||
UseGetOneHookValue, | ||
}; | ||
export * from './useQueryWithStore'; |
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.
This won't work: the Query
type will conflict with the Query
component.
The Query
type name is too generic; Something like DataProviderQuery
would be better, WDYT?
resource?: string; | ||
payload: object; | ||
} | ||
|
||
export interface QueryOptions { |
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.
This one should be named UseQueryOptions
. Sorry to find the problems one by one, but the fact that you decided to expose all exports in this file created new problems
No description provided.