-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(react-query): update to major v5 #13
Conversation
b6a50e2
to
99a732d
Compare
29790c5
to
f752904
Compare
@@ -1,5 +1,5 @@ | |||
// TODO(DakEnviy): Do not use react-query in core |
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.
Do you need todo?
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.
Yeah, just a reminder to find another function for hashing in the future
@@ -11,10 +14,10 @@ export const useInfiniteQueryData = <TDataSource extends AnyInfiniteQueryDataSou | |||
context: DataSourceContext<TDataSource>, | |||
dataSource: TDataSource, | |||
params: DataSourceParams<TDataSource>, | |||
options?: DataSourceOptions<TDataSource>, | |||
) => { | |||
options?: Partial<DataSourceOptions<TDataSource>>, |
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.
Can you move partial type to DataSourceOptions?
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.
I believe that having origin options can be useful
if (status === 'loading' && fetchStatus === 'idle') { | ||
if (status === 'pending') { | ||
if (fetchStatus === 'fetching') { | ||
return 'loading'; |
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 didn't you use pending
?
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.
loading
should tell to draw a loader, it's like isLoading
boolean flag is useQuery
result. pending
has a little bit different meaning
No description provided.