All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.immutable.dist.index.mjs Maven / Gradle / Ivy

There is a newer version: 2.2.5
Show newest version
import useSWR from 'swr';
import { withMiddleware } from 'swr/_internal';

const immutable = (useSWRNext)=>(key, fetcher, config)=>{
        // Always override all revalidate options.
        config.revalidateOnFocus = false;
        config.revalidateIfStale = false;
        config.revalidateOnReconnect = false;
        return useSWRNext(key, fetcher, config);
    };
var index = withMiddleware(useSWR, immutable);

export { index as default, immutable };




© 2015 - 2024 Weber Informatics LLC | Privacy Policy