Initial commit
This commit is contained in:
commit
89053153cc
8152 files changed
+2086461
No files matched your search
+6
@@ -0,0 +1,6 @@
|
||||
import { a as SWRHook, M as Middleware } from '../types-l2s7dphv.js';
|
||||
|
||||
declare const immutable: Middleware;
|
||||
declare const useSWRImmutable: SWRHook;
|
||||
|
||||
export { useSWRImmutable as default, immutable };
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { h as SWRHook, i as Middleware } from '../types-m1fld6v2.js';
|
||||
|
||||
declare const immutable: Middleware;
|
||||
declare const useSWRImmutable: SWRHook;
|
||||
|
||||
export { useSWRImmutable as default, immutable };
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var useSwr = require('../use-swr-guqrv3k1.js');
|
||||
var _internal_index = require('../_internal/index.js');
|
||||
|
||||
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 = _internal_index.withMiddleware(useSwr.useSWR, immutable);
|
||||
|
||||
exports.default = useSWRImmutable;
|
||||
exports.immutable = immutable;
|
||||
+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