Overview
Returns a function that blocks a user by their ID. On a new block, the server retroactively removes any existing follows and connections between the two users (both directions). Blocking is idempotent — re-blocking an already-blocked user succeeds.Requires the
moderation bundle. See Moderation — Blocking.Usage Example
Parameters
The hook returns a function. That function accepts:Returns
The returned function resolves to the block row, aBlockRow. Blocking a user the current user already blocks resolves to the existing row.
The blocked user. Public profile fields only. See User data model.
Related
- useUnblockUser
- useBlockManager — combines block/unblock with status loading

