Skip to content

v0.1.1

Latest
Compare
Choose a tag to compare
@danybeltran danybeltran released this 08 Apr 19:52
19ce003

Adds RequestFn type that helps add static typing to reusable hooks. Example:

import useSWR, { RequestFn } from 'swr-micro'

export const useUrl: RequestFn = (url, config) => {
  return useSWR('https://api.com' + url, config)
}