support queryKey shallow comparison #2990
vaynevayne
started this conversation in
RFC
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
for general form list page, when i click search button, i want take a fetch, but , when form not change, nothing happened
const { data: orders } = useSWR(user ? ['/api/orders',form] : null, fetchWithForm)
It is recommended to cancel automatic serialization within swr and hand over control to users
like
const { data: orders } = useSWR(user ? ['/api/orders',JOSN.stringify(form)] : null, fetchWithForm)
When I want to serialize, I can do it myself, and when I don't want to serialize, keep behaving like react.
Beta Was this translation helpful? Give feedback.
All reactions