Skip to content

Function: useHasRole() ​

ts
function useHasRole(role): Accessor<boolean>;

Defined in: packages/solid/src/context.ts:92

true if the user has the role, or ANY of the roles when given an array.

Parameters ​

ParameterType
roleMany<string>

Returns ​

Accessor<boolean>

Released under the MIT License. Inspired by spatie/laravel-permission.