-
Create an account with openweathermap.org
-
Get your APIKey here
-
Create a file in the root
.env.local
-
Add the following to it:
REACT_APP_OPEN_WEATHER_API_KEY=<Your_Api_Key>
-
Move forward to
Available scripts
yarn
yarn start
The aim of this test is to build a simple React app that displays the current weather info in London and weather forecasts for the next 5 days. The final user should also be able to refresh the view bypressing on a proper button.
You are free to design the app according to what you think is the best solution in terms of UI/UX.
The minimum expected info to be displayed are:
-
Current weather:
- Weather description
- Temperature in Celsius Degrees (current, min and max)
- Humidity percentage
- Date of last update
-
Forecast item
- Day
- Weather description
- Temperature in Celsius Degrees (current, min and max)
The app should fetch and display the current weather info in London and weather forecasts for the next 5 days as soon as it gets open. Please consider this test like an app that should go to production, so error handling and any good practice is expected. As for the design step, it is up to you to implement features that you think are important for the final user for better usability.
- tests
- if mock flag true return mocks
Palloncino (Antonio Guiotto) Feb 2022