useListings
This hook is SWR powered and also handles infinite loading UX. Use this hook to fetch listings, using the Asks (listings) endpoint. It takes a query parameter which maps to the same parameters that the api endpoint uses.
import { useListings } from '@reservoir0x/reservoir-kit-ui'
const {
data: listings,
fetchNextPage,
hasNextPage,
} = useListings({
contracts: ['0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb'],
})
Updated almost 2 years ago