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

react-offline-component

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-offline-component

Checks net connection and renders component accordingly

latest
Source
npmnpm
Version
0.1.0-alpha.3
Version published
Maintainers
1
Created
Source

GitHub license GitHub issues GitHub release (latest SemVer) npm npm bundle size

React offline component

Simple react component that enables you to render content based on net connectivity (i.e. Online | Offline)

Installing

$ npm install react-offline-component --save

Basic usage

import React from 'react';
import ReactDOM from 'react-dom';
import { Online, Offline } from 'react-offline-component';

const MainComponent = () => {
  return (
    <React.Fragment>
      <Online>Hey! You are online</Online>
      <Offline>You're offline. Check your connection!</Offline>
    </React.Fragment>
  )
}

ReactDOM.render(<MainComponent />, document.getElementById('root'));

Both Online as well as Offline are conditional components. So, you won't be seeing any online or offline component unless you are in that state.

License

Published under the MIT License.

Keywords

react

FAQs

Package last updated on 24 Jan 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