mirror of
https://github.com/streamich/react-use.git
synced 2026-01-18 14:06:52 +00:00
325 B
325 B
usePermission
React UI hook that query permission status from the user depends on the specific AP.
Usage
import {usePermission} from 'react-use';
const Demo = () => {
const state = usePermission({ name: 'microphone' });
return (
<pre>
{JSON.stringify(state, null, 2)}
</pre>
);
};