JamesIves/react-use-navigator-permissions

listen to change event to update state

Opened this issue · 0 comments

https://developer.mozilla.org/en-US/docs/Web/API/PermissionStatus/change_event

  permissionStatus.onchange = () => {
    console.log(`geolocation permission state has changed to ${permissionStatus.state}`);
  };