This is a simple Weather React App that displays the current weather of the user's location. The app uses the TrueWay Geocoding API to get the user's location and the OpenWeatherMap API to get the weather data.
- Get coordinates: The app uses the
navigator.geolocation.getCurrentPosition()method to get the user's current location. - Reverse geolocation: The
fetchGeolocation()method is called with the user's latitude and longitude to get the user's city and country from the TrueWay Geocoding API. - Fetch weather data: The
fetchWeatherData()method is called with the user's city and country to get the weather data from the OpenWeatherMap API. The weather data is displayed on the screen using the WeatherData component.
Here's what you need to be able to run this App:
- Node.js installed
- NPM (Node Package Manager) installed
Execute the following commands:
git clone https://github.com/SofiaBracho/weather.git
cd weatherExecute the command:
npm installnpm startThis wheather app is open to anyone from the community to contribute. If you'd like to, fork the repository and make changes. Pull requests are welcome.
Sofia Bracho
Web developer
