Skip to content

Commit

Permalink
add better descriptions and change variable name in example
Browse files Browse the repository at this point in the history
  • Loading branch information
mathdroid committed Oct 25, 2018
1 parent c10d13d commit ee55ae9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `@rehooks/online-status`

> React hook for subscribing to online status
> React hook for subscribing to online/offline events and the `navigator.onLine` property to see current status
> **Note:** This is using the new [React Hooks API Proposal](https://reactjs.org/docs/hooks-intro.html)
> which is subject to change until React 16.7 final.
Expand Down
4 changes: 2 additions & 2 deletions example.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from "react";
import { render } from "react-dom";
import useOfflineStatus from "./";
import useOnlineStatus from "./";

function App() {
let onlineStatus = useOfflineStatus();
let onlineStatus = useOnlineStatus();
return (
<div>
<h1>You are {onlineStatus ? "Online" : "Offline"}</h1>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@rehooks/online-status",
"version": "1.0.0",
"description": "React hook for monitoring online status",
"description": "React hook for subscribing to online/offline events and the `navigator.onLine` property to see current status",
"main": "index.js",
"repository": "https://github.com/rehooks/online-status",
"author": "@mathdroid",
Expand Down

0 comments on commit ee55ae9

Please sign in to comment.