T
TanStack3y ago
correct-apricot

Does the result of the queryFn (data) need to be serializable?

Or could I return something like a class instance or function?
2 Replies
exotic-emerald
exotic-emerald3y ago
it can be non-serializable, but be advised that optimization features like structuralSharing only work on json serializable data also, persisters and SSR need json serializable values
correct-apricot
correct-apricotOP3y ago
Thanks -- in other words "technically ok but probably not a good idea"

Did you find this page helpful?