Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 354 Bytes

usePermission.md

File metadata and controls

21 lines (16 loc) · 354 Bytes

usePermission

Vue side-effect hook to query permission status of browser APIs.

Usage

import {usePermission} from 'vue-next-use';

const Demo = {
  setup(){
      const state = usePermission({ name: 'microphone' });

      return () => (
          <pre>
              {JSON.stringify(state, null, 2)}
          </pre>
      );
  }
};