Skip to content
Discussion options

You must be logged in to vote

Looks like I defined the Data type incorrectly and should have Awaited the response of the fetcher:

useSWR<Awaited<ReturnType<typeof getProfile>> | undefined>

I confirm I can use the refreshInterval function version and return 0 based on the resolved value of getProfile which gets passed to refreshInterval function (as a resolved value).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by justin-calleja
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant