Skip to content

Commit

Permalink
Docs: Tweak docs for Hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
addyosmani authored Aug 27, 2019
1 parent 4722b63 commit f68e274
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions hooks/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Usage

The following are a suite of [React Hooks](https://reactjs.org/docs/hooks-overview.html) for providing reusable stateful behavior in the form of environment-signals between different components.

## Network
React hook for getting network status (effective connection type)

```
```js
import { useEffectiveConnectionType } from './network';

const MyComponent = () => {
Expand Down Expand Up @@ -35,7 +37,7 @@ const MyComponent = () => {
## Memory
React hook for getting memory status of the device

```
```js
import { useMemoryStatus } from './memory';

const MyComponent = () => {
Expand All @@ -51,7 +53,7 @@ const MyComponent = () => {
## Device-class
React hook for getting device-class whether it's light or heavy

```
```js
import { useDeviceClass } from './device-class';

const MyComponent = () => {
Expand All @@ -67,7 +69,7 @@ const MyComponent = () => {
## Battery
React hook for getting battery status

```
```js
import { useBatteryStatus } from './battery';

const MyComponent = () => {
Expand Down

0 comments on commit f68e274

Please # to comment.