react-open-weather-map
Yet another React Weather component based on OpenWeatherMap's API
Usage
Npm install using the following command:
npm i react-open-weather-map
And use it inside your React app:
; const props = data: sample ; // info: sample is the response object from the OpenWeatherMap's API <OpenWeatherMap ...props />
Data sample:
Config
The component accepts a config object that can be used in order to specify:
name | type | default | description |
---|---|---|---|
containerClassName | string | 'react-open-weather-map' | the container class name |
; const config = containerClassName: 'open-weather-map-container-class-name' ; <OpenWeatherMap config=config />
Example
Clone or download this GitHub repository then run the example app using the following npm commands:
npm i
npm run example