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

perf(vue-query): reuse parsing utility functions from query-core #5984

Closed

Conversation

Mini-ghost
Copy link
Contributor

@Mini-ghost Mini-ghost commented Sep 9, 2023

In query-core, there are several utility functions provided, such as parseQueryArgs, parseMutationArgs, parseFilterArgs, and parseMutationFilterArgs. These can be reused in vue-query, and all we need to do is unwrap ref and perform deep cloning to track nested reactive data.

This PR can reduce the bundle size a little bit

index.product.js ⏤ 12.6 kB (-156 B) ≈ -1.24%

@vercel
Copy link

vercel bot commented Sep 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
query ⬜️ Ignored (Inspect) Visit Preview Sep 10, 2023 3:31pm

@nx-cloud
Copy link

nx-cloud bot commented Sep 9, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 9ab7618. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 9, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 9ab7618:

Sandbox Source
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-svelte-basic Configuration
@tanstack/query-example-vue-basic Configuration

@codecov-commenter
Copy link

Codecov Report

Patch coverage is 100.00% of modified lines.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Changed Coverage
packages/vue-query/src/useBaseQuery.ts 100.00%
packages/vue-query/src/useIsFetching.ts 100.00%
packages/vue-query/src/useIsMutating.ts 100.00%
packages/vue-query/src/useMutation.ts 100.00%

📢 Thoughts on this report? Let us know!.

@Mini-ghost Mini-ghost changed the title refactor(vue-query): reuse parsing utility functions from query-core perf(vue-query): reuse parsing utility functions from query-core Sep 9, 2023
@TkDodo
Copy link
Collaborator

TkDodo commented Sep 9, 2023

All those utils have been removed in v5 because they are no longer necessary.

@Mini-ghost
Copy link
Contributor Author

I can't wait to upgrade to v5! Also, will this PR make it difficult to merge the main branch into beta? If so, I will close this PR.

@TkDodo
Copy link
Collaborator

TkDodo commented Sep 9, 2023

yeah potentially, not sure. @DamianOsipiuk knows :)

5.0-rc is coming soon!

@DamianOsipiuk
Copy link
Contributor

I would prefer to leave it as-is, since gains are not huge.

@TkDodo TkDodo closed this Sep 11, 2023
@Mini-ghost Mini-ghost deleted the refactor/use-core-function branch September 11, 2023 13:39
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.

None yet

4 participants