weather-view
v0.2.1
Published
A weather widget written in React
Downloads
14
Readme
weather-view
A weather widget written in React
In general, this is a demonstration repo for publishing shared React components, and all the wild build tools available.
Uses https://openweathermap.org/current to fetch some data and display it. Requires an API key for this service, but it's free for low usage.
Looks like this:
To obtain an API key, go to https://openweathermap.org and sign in, then click on API Keys:
Then generate a new key and copy it to your react component
Usage:
npm install --save weather-view
Then, in a React 16 project:
import Weather from 'weather-view'
export const MyComponent = () => {
return (
<div>
<Weather
apiKey={/* Open Weather Map API Key */}
location={/* a location to pass to Open Weather Map API */}
/>
</div>
)
}