> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://sdk.railnet.org/api/mcp` to find what you need.

# useRevokeScopedRole

React mutation hook for revoking a scoped role on the ExternalAccessControl.

## Import

```ts
import { useRevokeScopedRole } from '@railnetorg/railnet-sdk/react'
```

## Usage

```tsx
import { useRevokeScopedRole } from '@railnetorg/railnet-sdk/react'
import { VEHICLE_STEAM_DEPOSIT } from '@railnetorg/railnet-sdk'

function RevokeRole() {
  const { mutateAsync, isPending } = useRevokeScopedRole()

  const handleRevoke = async () => {
    await mutateAsync({
      accessControl: '0x...',
      role: VEHICLE_STEAM_DEPOSIT,
      scope: '0x...',
      grantee: '0x...',
      account: '0x...',
    })
  }

  return (
    <button disabled={isPending} onClick={handleRevoke}>
      Revoke Role
    </button>
  )
}
```

## Returns

```ts
UseMutationResult<Hash, Error, RevokeScopedRoleParameters & { account: Address }>
```

Mutation result. Call `mutate` or `mutateAsync` with [`revokeScopedRole`](/actions/revokeScopedRole) parameters.
