https://github.com/stevendelro/redux-weather
v1.0 - Built with React and the Dark Sky API. The UI is based off of the iOS Weather App.
https://github.com/stevendelro/redux-weather
axios create-react-app momentjs react react-media react-redux react-router-dom react-skycons redux-thunk semantic-ui-react uuid
Last synced: 10 months ago
JSON representation
v1.0 - Built with React and the Dark Sky API. The UI is based off of the iOS Weather App.
- Host: GitHub
- URL: https://github.com/stevendelro/redux-weather
- Owner: stevendelro
- Created: 2019-09-13T21:01:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T10:20:32.000Z (over 3 years ago)
- Last Synced: 2025-02-22T11:35:20.753Z (over 1 year ago)
- Topics: axios, create-react-app, momentjs, react, react-media, react-redux, react-router-dom, react-skycons, redux-thunk, semantic-ui-react, uuid
- Language: JavaScript
- Homepage: https://redux-weather.now.sh
- Size: 41.1 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# [LIVE DEMO](https://redux-weather-cm85uhch7.now.sh/)
### How it works:
1. User input fires off a call to the [MapBox API](https://www.mapbox.com/) and retrieves coordinates and the place name:
```
axios
.get(mapBoxUrl)
.then(async geocodeData => {
const long = geocodeData.data.features[0].center[0]
const lat = geocodeData.data.features[0].center[1]
const place = geocodeData.data.features[0].place_name
```
2. Then, the coordinates are sent to the [Dark Sky API](https://darksky.net) to retrieve weather data:
```
await axios
.get(`${proxy}${darkSkiesUrl}${lat},${long}?exclude=flags`)
.then(request => {
const weatherData = request.data
dispatch(displayedPlace(place))
dispatch(fetchWeatherSuccess(weatherData))
})
.catch(error =>
console.log('Error making darksky call: ', error)
)
})
.catch(error => console.log('Error making geocode call: ', error))
```
### Technologies used
`react` `react-redux` `react-router-dom` `create-react-app` `react-skycons` `semantic-ui-react` `react-media` `redux-thunk` `uuid` `momentjs` `axios`
### Editing/Setup
1. Clone the repo
`git clone https://github.com/stevendelro/startnow-react200-movie-finder`
2. Install the dependencies
`yarn install`
3. Run build
`yarn start`
### License
MIT