Skip to main content

Overview

Returns a function that checks whether the current authenticated user blocks a given userId. The result reports the current user’s outbound state only — whether I block this user. It never reveals whether the other user has blocked the current user (the inbound direction is deliberately hidden for non-disclosure).

Usage Example

Parameters

The hook returns a function. That function accepts:
string
required
The ID of the user to check. Cannot be the current user’s own ID.

Returns

The function resolves to a BlockStatus:
boolean
Whether the current user blocks the target user.
BlockRow | undefined
The block row, present only when isBlocking is true. Its user is the target user. See BlockRow.