Skip to content

fix(queriesObserver): always use latest combine function - #6651

Merged
TkDodo merged 2 commits into
mainfrom
feature/useQueries-stale-closure
Jan 5, 2024
Merged

fix(queriesObserver): always use latest combine function#6651
TkDodo merged 2 commits into
mainfrom
feature/useQueries-stale-closure

Conversation

@TkDodo

Copy link
Copy Markdown
Collaborator

computing the optimistic result didn't use the latest combine function, but the one set from setOptions (which runs in an effect, but is too late)

fixes#6648

computing the optimistic result didn't use the latest combine function, but the one set from setOptions (which runs in an effect, but is too late)
@vercel

vercelBot commented Jan 5, 2024

Copy link
Copy Markdown

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

1 Ignored Deployment
NameStatusPreviewCommentsUpdated (UTC)
query⬜️ Ignored (Inspect)Visit PreviewJan 5, 2024 8:51pm

@nx-cloud

nx-cloudBot commented Jan 5, 2024

Copy link
Copy Markdown

☁️ Nx Cloud Report

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

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@codesandbox-ci

codesandbox-ciBot commented Jan 5, 2024

Copy link
Copy Markdown

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 05341e9:

SandboxSource
@tanstack/query-example-angular-basicConfiguration
@tanstack/query-example-react-basic-typescriptConfiguration
@tanstack/query-example-solid-basic-typescriptConfiguration
@tanstack/query-example-svelte-basicConfiguration
@tanstack/query-example-vue-basicConfiguration

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (f43d2ad) 41.74% compared to head (05341e9) 58.66%.

FilesPatch %Lines
...s/angular-query-experimental/src/inject-queries.ts0.00%1 Missing ⚠️
packages/query-core/src/queriesObserver.ts50.00%0 Missing and 1 partial ⚠️

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

Additional details and impacted files
@@ Coverage Diff @@## main #6651 +/- ##
===========================================
+ Coverage 41.74% 58.66% +16.92% 
===========================================
Files 179 117 -62 Lines 7011 4493 -2518 Branches 1419 1121 -298 ===========================================
- Hits 2927 2636 -291 + Misses 3713 1618 -2095 + Partials 371 239 -132 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TkDodo
TkDodo merged commit 9e0bfa8 into mainJan 5, 2024
@TkDodo
TkDodo deleted the feature/useQueries-stale-closure branch January 5, 2024 21:03
Sign up for freeto 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.

Using state inside combine function uses previous value

2 participants

@TkDodo@codecov-commenter