T
TanStack2y ago
correct-apricot

Storing class instance in cache

Hey, I want to use value object pattern, implementation is done through class, is there any risk when storing class instance in react-query cache? I tested it and works fine but still want to double check with you.
3 Replies
genetic-orange
genetic-orange2y ago
structural sharing won't work, but that's about it
other-emerald
other-emerald16mo ago
What's the effect of structural sharing not working?
genetic-orange
genetic-orange16mo ago
Render Optimizations | TanStack Query React Docs
React Query applies a couple of optimizations automatically to ensure that your components only re-render when they actually need to. This is done by the following means: structural sharing

Did you find this page helpful?