My take on a weather app. This obviously isn't the most original groundbreaking idea, but I used it as a bit of practice. I wanted to go from idea, to functioning app in the shortest amount of time. In the end this took about ~8 hours of coding time.
It is built using React, I used the Context API to store the weather data globally, which going forward will be helpful if I want to continue to build out the UI. I used the OpenWeatherMap API to get the weather information. For styling I used styled-components.
In the project directory:
- npm / yarn install
- Get an API key from https://openweathermap.org/, created a .env file in the root directory and save the API key as REACT_APP_WEATHERAPIKEY. e.g REACT_APP_WEATHERAPIKEY=123456789
- npm / yarn start
- Open http://localhost:3000 to view it in the browser.