I'm building a React weather app with an API that only accepts a Latitude and Longitude, not a city name. I'm new to React and am wondering if there's a way to transform the user input (City name) to latitude and longitude so I can call the api.
Thank you!
You should try a geolocation package or api like this one for example: https://www.npmjs.com/package//react-geocode
They've already done the busy work of figuring out that conversion for you.