1.0.5 • Published 4 years ago

react-app-offline v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

react-app-offline

This library displays "offline" or "coming soon" layout and disables the react app. When using react-app-offline, the application will stop rendering the usual content to the DOM and instead it will render ComingSoon layouts. It helps you when your application is under maintenance or offline due to several reasons (application still under development, troubleshooting the back-end, etc... ).

You can eventually disable your application for the public but still enable it for you and your team or client by configuring a simple password prompt.

NPM JavaScript Style Guide

Demo

Existeur.com

Install

npm install --save react-app-offline

Usage

import React, { Component } from "react";

import AppOffline from "react-app-offline";

class Example extends Component {
  render() {
    return <AppOffline isOffline />;
  }
}

Props

proprequireddefaultdescriptiontype
isOfflinetruetrueif isOffline is true, your application will be disable and only show the offline layoutbool
childrentrue-children represents the content will be shown in the default layoutany
customLayoutfalse-You can customize the offline layout as a whole using customLayout. It accepts React component and JSX content.any
rootfalse"root"The application root element. Sometimes "app".string

License

MIT © existeur2