1.0.4 • Published 5 years ago

react-isonline-hook v1.0.4

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

Project

This react hooks tracks that user is online or offline. You can directly use in your function component and can get the online status of user in boolean form.

Getting Started

const StatusIndicator = () => {
  const isOnline = useNavigatorOnLine();

  return <span>You are {isOnline ? 'online' : 'offline'}.</span>;
};

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

Prerequisites

Works with React 16.8.0 and above.

Installing

\$ npm install react-isonline-hook --save

Versioning

1.0.0

Authors

Shivyan

License

MIT

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago