Swr: useSWRPages is not exported from swr

Created on 27 Aug 2020  路  1Comment  路  Source: vercel/swr

I am new to swr package, and I came to know it from a tutorial over the internet, which import a function named useSWRPages from the 'swr' package and uses it to paginate results from call made to API

However when I run the code , it says that 'useSWRPages' is not exported from 'swr'

Did the function exist but has been depreciated or it never was and that's the author's mistake?

Most helpful comment

@marouaneat95 useSWRPages was removed from swr since v0.3.0. you can use useSWRInfinite instead. checkout the usage sample in https://swr.vercel.app/examples/infinite-loading

>All comments

@marouaneat95 useSWRPages was removed from swr since v0.3.0. you can use useSWRInfinite instead. checkout the usage sample in https://swr.vercel.app/examples/infinite-loading

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zahraHaghi picture zahraHaghi  路  3Comments

dandrei picture dandrei  路  3Comments

sergiodxa picture sergiodxa  路  4Comments

loveholly picture loveholly  路  3Comments

oran1248 picture oran1248  路  3Comments