query icon indicating copy to clipboard operation
query copied to clipboard

feat: allow custom merge function for structuralSharing

Open richsilv opened this issue 3 years ago • 2 comments

As discussed here and here, this allows the provision of a function as the structuralSharing value, which effectively acts as a replacement for replaceEqualDeep. This way, consumers can still achieve the performance benefits of retained references even when cache data contains non-serializable values.

richsilv avatar Jul 19 '22 17:07 richsilv

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

Name Status Preview Updated
query ✅ Ready (Inspect) Visit Preview Jul 19, 2022 at 5:24PM (UTC)

vercel[bot] avatar Jul 19 '22 17:07 vercel[bot]

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

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

codesandbox-ci[bot] avatar Jul 19 '22 17:07 codesandbox-ci[bot]

Codecov Report

Merging #3868 (fb3fcb3) into main (eab6e2c) will increase coverage by 0.45%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #3868      +/-   ##
==========================================
+ Coverage   96.36%   96.81%   +0.45%     
==========================================
  Files          45       57      +12     
  Lines        2281     2668     +387     
  Branches      640      783     +143     
==========================================
+ Hits         2198     2583     +385     
- Misses         80       83       +3     
+ Partials        3        2       -1     
Impacted Files Coverage Δ
src/devtools/theme.tsx
src/core/queriesObserver.ts
src/react/QueryClientProvider.tsx
src/core/focusManager.ts
src/react/logger.native.ts
src/core/queryClient.ts
src/core/onlineManager.ts
src/core/infiniteQueryObserver.ts
src/react/useMutation.ts
src/devtools/useLocalStorage.ts
... and 92 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Aug 13 '22 10:08 codecov-commenter