Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 554 Bytes

useGeolocation.md

File metadata and controls

36 lines (28 loc) · 554 Bytes

useGeolocation

Vue sensor hook that tracks user's geographic location. This hook accepts position options.

Usage

<template>
  <pre>
      {{JSON.stringify(state, null, 2)}}
    </pre
  >
</template>

<script>
import { useGeolocation } from "vue-next-use";

export default {
  components: {},
  props: {},
  setup() {
    const state = useGeolocation();

    return {
      state,
    };
  },
};
</script>

Reference

useGeolocation(options: PositionOptions)