Closed markerikson closed 3 years ago
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 35504ca5684a21fcd66f5c83192d1910bfb326e5:
Sandbox | Source |
---|---|
React | Configuration |
React Typescript | Configuration |
rtk-query-demo | Configuration |
svelte-app-rtk-simplequery-demo | Configuration |
Deploy preview for rtk-query-docs ready!
Built with commit 35504ca5684a21fcd66f5c83192d1910bfb326e5
Path | Size |
---|---|
ESM full | 10.15 KB (0%) |
ESM full (React) | 11.56 KB (0%) |
createApi + setupListeners | 9.19 KB (0%) |
createApi (React) + setupListeners | 10.46 KB (0%) |
fetchBaseQuery | 701 B (0%) |
retry | 278 B (0%) |
ApiProvider | 400 B (0%) |
CJS minfied | 15.67 KB (0%) |
CJS React minfied | 17.37 KB (0%) |
This PR:
selectFromResult
always returns an object, not a primitiveI'd found a lovely edge case in my own app where I had:
Unfortunately, due to how the result stuff gets merged together later, I ended up with
number & BunchOfResultData
, which is of course not valid at all. I had to ensure that I returned the value inside an object.So, now we enforce that at the type level too.