Initial commit
This commit is contained in:
commit
afed023152
8152 files changed
+2086461
No files matched your search
+14
@@ -0,0 +1,14 @@
|
||||
import { u as useSWR } from '../use-swr-emll9s78.mjs';
|
||||
import { withMiddleware } from '../_internal/index.mjs';
|
||||
|
||||
const immutable = (useSWRNext)=>(key, fetcher, config)=>{
|
||||
// Always override all revalidate options.
|
||||
config.revalidateOnFocus = false;
|
||||
config.revalidateIfStale = false;
|
||||
config.revalidateOnReconnect = false;
|
||||
config.refreshInterval = 0;
|
||||
return useSWRNext(key, fetcher, config);
|
||||
};
|
||||
const useSWRImmutable = withMiddleware(useSWR, immutable);
|
||||
|
||||
export { useSWRImmutable as default, immutable };
|
||||
Reference in new issue
Block a user