Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swrize

SWR for functions

import swrize from "swrize";

const myFunc = swrize(
  async (foo) => {
    const res = await fetch(`https://example.com/${foo}`);
    return res.json();
  },
  {
    staleWhileRevalidate: 3600 * 24 * 7,
    maxAge: 3600,
  }
);

About

SWR for functions

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages