Web APIs - Geolocation Hook in React

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • Create a hook to use a device's location information with the geolocation API.
    Repo link: github.com/chr...

Комментарии • 2

  • @tabdig
    @tabdig 4 месяца назад

    So everytime i reload and the website has access to my location. It just returns null

  • @fal8202
    @fal8202 9 месяцев назад

    Thank you Chris for this compact and very useful video, i used it in my Nextjs project with some adjustments like wrapping the fetch function in a useEffect so it does it only once.
    I am getting the location data but not the timestamp (on Chrom), any hints? Thanks