useMutualFollowers
useMutualFollowers
is a React Hook that lets you query the followers in common between two profiles.
const { data, loading, hasMore, next } = useMutualFollowers(args)
Usage
import { useMutualFollowers } from '@lens-protocol/react-web';
function MutualFollowers() {
const { data, loading } = useMutualFollowers({
observerId: '0x02',
viewingProfileId: '0x03',
});
}
Reference
useMutualFollowers(args)
useMutualFollowers(args)
Parameters
observerId: string
(required)
- The id of the profile who is running the query, usually the logged in/active profile
viewingProfileId: string
(optional)
- The id of the profile to compare the followers with
limit: number
(optional)
- The amount of items to return
Returns
{
data: ProfileFragment[],
loading: boolean,
hasMore: boolean, // whether there are more mutual followers after the current batch
next(): () => void, // fetches the next mutual followers and appends to the data
}
Updated 6 months ago