Skip to content
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

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Conversation

DakEnviy
Copy link
Collaborator

No description provided.

@DakEnviy DakEnviy force-pushed the feat/update-react-query-5 branch 7 times, most recently from b6a50e2 to 99a732d Compare August 11, 2024 19:19
@DakEnviy DakEnviy force-pushed the feat/update-react-query-5 branch 2 times, most recently from 29790c5 to f752904 Compare August 11, 2024 19:56
@DakEnviy DakEnviy requested a review from personaljs August 11, 2024 19:57
@@ -1,5 +1,5 @@
// TODO(DakEnviy): Do not use react-query in core

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need todo?

Copy link
Collaborator Author

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>>,

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?

Copy link
Collaborator Author

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';

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?

Copy link
Collaborator Author

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

@personaljs personaljs merged commit 9e6b893 into main Aug 12, 2024
7 checks passed
@personaljs personaljs deleted the feat/update-react-query-5 branch August 12, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants