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)
}
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)
}