0.1.0-alpha.3 • Published 6 years ago
react-offline-component v0.1.0-alpha.3
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 --saveBasic 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.
0.1.0-alpha.3
6 years ago
0.1.0-alpha.2
6 years ago
0.1.0-alpha.1
6 years ago
0.1.0-alpha.0
6 years ago
0.1.0
6 years ago