Simple web application to show weather information.
Have a running react app with that displays the weather of a given location in a box.
The box should be horizontally and vertically centered.
Windspeed should be displayed in knots per hour.
Document your steps via commits.
Provide your solution as a pull request for master
Bonuses:
- Use Typescript
- Add weather icon to the top right (weather api specs)
- Integrate forecast for tomorrow
- Add a location search
Data Sources As a starting point, use this location to retrieve the weather: https://www.metaweather.com/api/location/638242/ When you are done, please, submit your solution to a Git Repository of your choice.
I've used yarn for package managing but npm can be also used.
Just run
yarn
or
npm install
This project was created using create-react-app with its Typescript template.
I've also used eslint and prettier for code formatting and sass for styling.
I've choosen prop drilling as data flow strategy. Using Redux or prefereably the React's Context API are overkill in this case.
Due to the size of the application and low requirements in terms of communications, I haven't used any external HTTP client such as Axios or http-cient. Fetch API with proper error handling is fairly enough.
Requests for weather data are made directly in the App component. Requests for locations came from the DaySelector component. And that's all.
Unfortunatelly, MetaWeather responses do not contain the 'Access-Control-Allow-Origin: *' header so I opted to enable the proxy from the React dev server.
This makes the project not suitable for a production environment, but it's fine for this showcase.
As an extra challenge for myself I added several visuals to the application generated by the browser. No extra downloads.
I had a lot of fun doing this challenge and I want to thank you for the opportunity.
Hope you like it.