JSFiddle - React, Tailwind, and code Playground
CoffeeScript
if navigator.geolocation
navigator.geolocation.getCurrentPosition(
(position) =>
console.log position.coords.latitude + ',' + position.coords.longitude
)
else
console.log 'no loc'