New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

weather-view

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weather-view

A weather widget written in React

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
2
Created
Source

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: image of weather component

To obtain an API key, go to https://openweathermap.org and sign in, then click on API Keys:

image of openweathermap website pointing to api keys page

Then generate a new key and copy it to your react component

image of clicking the generate api key button

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>
    )
}

Keywords

React

FAQs

Package last updated on 03 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts