T
TanStack13mo ago
fascinating-indigo

Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null...

It only works when I pass queryFn as queryFn:()=> getTodos() in the clinet component But gives an error if queryFn: getTodos
1 Reply
other-emerald
other-emerald13mo ago
Pretty sure for Server Actions it'll have to be JSON serializable. I'm assuming this is more a React RSC/NextJs question then a Query question though.

Did you find this page helpful?