Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

useQuery: skip uninitialized status #197

Merged
merged 1 commit into from
Apr 7, 2021
Merged

Conversation

phryneas
Copy link
Collaborator

@phryneas phryneas commented Apr 6, 2021

Wrapper around defaultQueryStateSelector to be used in useQuery.

We want the initial render to already come back with { isUninitialized: false, isFetching: true, isLoading: true } to prevent that the library user has to do an additional check for isUninitialized/

@phryneas
Copy link
Collaborator Author

phryneas commented Apr 6, 2021

Funny enough it seems we had no test that triggered on this behavioral change 🎉

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 6, 2021

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 b2faca7:

Sandbox Source
React Configuration
React Typescript Configuration
rtk-query-demo Configuration
svelte-app-rtk-simplequery-demo Configuration

@github-actions
Copy link

github-actions bot commented Apr 6, 2021

size-limit report 📦

Path Size
ESM full 10.07 KB (0%)
ESM full (React) 11.45 KB (+0.45% 🔺)
createApi + setupListeners 9.13 KB (0%)
createApi (React) + setupListeners 10.38 KB (+0.53% 🔺)
fetchBaseQuery 661 B (0%)
retry 271 B (0%)
ApiProvider 400 B (0%)
CJS minfied 15.59 KB (0%)
CJS React minfied 17.25 KB (+0.35% 🔺)

Copy link
Member

@msutkowski msutkowski left a comment

Choose a reason for hiding this comment

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

🏆

@phryneas phryneas merged commit 650b406 into next Apr 7, 2021
@phryneas phryneas deleted the useQuery-skip-uninitialized branch April 7, 2021 17:15
@phryneas phryneas restored the useQuery-skip-uninitialized branch May 31, 2021 14:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants