UNPKG

@wojtekmaj/react-hooks

Version:

A collection of React Hooks.

9 lines (8 loc) 355 B
/** * Returns permission state given permission name. * * @param {PermissionDescriptor} options Options * @param {PermissionDescriptor.name} options.name Permission name * @returns {string | null} Permission state ("granted", "denied", "prompt") */ export default function usePermissionState({ name }: PermissionDescriptor): PermissionState | null;