next-fetch
next-fetch copied to clipboard
Allow disabling the fetching based on a condition
The SWR API allows users to opt out of fetching by having a null
key:
useSWR(() => someCondition ? null : "/my/key", ...)
I think we can support that too with our API. We can accept null
and/or a function that resolves into a null/object to allow conditional fetching