An open API service indexing awesome lists of open source software.

https://github.com/chris-pearce/weather-widget

A simple weather widget built in React (done for a technical test) 🌤.
https://github.com/chris-pearce/weather-widget

Last synced: 4 months ago
JSON representation

A simple weather widget built in React (done for a technical test) 🌤.

Awesome Lists containing this project

README

        

# Weather Widget

A simple weather widget built for a [technical test](https://ffxblue.github.io/interview-tests/test/weather-widget/).

## Todo

- Add Error Boundries.
- Make API key private ([see](https://www.robinwieruch.de/react-fetching-data/#comment-3964499401)).
- Show night/day icons.
- Deploy to GH Pages.
- Tests.
- Loading placeholder for icon.
- Favicon.
- stylelint.
- Local storage.
- Add a page reload button to `EditorWidget` to give option to refresh location.
- Set focus to relevant element when view loads.

## If I had more time

- Use TypeScript.
- Swap out the `.png` icons for custom SVG icons that I'd render inline.
- Add Storybook.
- Fallback for browsers that don't support Geolocation API, use IP Lookup ([see](https://medium.com/@adeyinkaadegbenro/how-to-detect-the-location-of-your-websites-visitor-using-javascript-92f9e91c095f)).

## Going Beyond the Requirements

- I added a page title (`

`) as I felt it improved the UX.

## Table of Contents

- [Built with Create React App](#built-with-create-react-app)
- [Available Scripts](#available-scripts)
- [`npm start`](#npm-start)
- [`npm test`](#npm-test)
- [`npm run build`](#npm-run-build)
- [Learn More](#learn-more)

## Built with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

### Available Scripts

In the project directory, you can run:

#### `npm start`

Runs the app in the development mode.

Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

#### `npm test`

Launches the test runner in the interactive watch mode.
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

#### `npm run build`

Builds the app for production to the `build` folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).