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

[C-5828] Fix useQueries default loading state #11569

Merged
merged 3 commits into from
Mar 11, 2025

Conversation

dylanjeffers
Copy link
Contributor

Description

Fixes issue where useQueries when provided "empty" array results in isPending = false, leading to issues where hooks that use useUsers as part of their data fetching flow have invalid isPending state during the handoff from the first api call to the useUsers call.

The fix is to decorate the tan-query useQueries hook with our special version that sets isPending = true for the one render cycle while the useQueries hook is transitioning from the empty state.

Also updates our types for combine-query-statuses, which allows us to get rid of annoying type-casts.

Copy link

changeset-bot bot commented Mar 10, 2025

⚠️ No Changeset found

Latest commit: 9c293aa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dylanjeffers dylanjeffers merged commit df654fa into main Mar 11, 2025
7 of 9 checks passed
@dylanjeffers dylanjeffers deleted the add-use-queries-wrapper branch March 11, 2025 02:13
schottra added a commit that referenced this pull request Mar 11, 2025
* origin/main:
  Remove prop in PlayCountMilestoneContent causing type error (#11575)
  dual write to acdc and core (#11573)
  [C-5828] Fix useQueries default loading state (#11569)
  fix attest endpoint (#11552)
  Fix unlocked gated content section on web (#11568)
  Remove end_date on play count challenge and update query (#11563)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant