You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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