simple-react-weather

Very basic weather applet for React with icons


Keywords
weather, react, component, applet, owm, open weather map
License
GPL-3.0
Install
npm install simple-react-weather@1.0.2

Documentation

simple-react-weather

Very basic weather applet for React with icons from react-icons-weather
Demo available here

NPM JavaScript Style Guide

Install

npm install --save simple-react-weather

Usage

import React, { Component } from 'react'
import Weather from 'simple-react-weather'

class Example extends Component {
  render () {
    return (
      //With city name provided
      <Weather unit="C" city="CITY" appid="YOUR APPID FROM OWM" />
      //Based on latitude and longitude
      <Weather unit="C" lat="" lon="" appid="YOUR APPID FROM OWM" />
    )
  }
}

Props

unit: String
C for Celcius, F for Fahrenheit
lat/lon: Number
Latitude and longitude, can be acquired from navigator.geolocation.getCurrentPosition()
city: String
appid: String
Your AppId from OWM

You can also use all other custom props like onClick, id etc.

License

GNU GPLv3 © iruszpel