Skip to content

Commit d3d5bc9

Browse files
committed
Unify imports in docs
1 parent 17dd1f1 commit d3d5bc9

8 files changed

+8
-10
lines changed

docs/useEvent.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ React sensor hook that subscribes a `handler` to events.
66
## Usage
77

88
```jsx
9-
import useEvent from 'react-use/lib/useEvent';
10-
import useList from 'react-use/lib/useList';
9+
import {useEvent, useList} from 'react-use';
1110

1211
const Demo = () => {
1312
const [list, {push, clear}] = useList();

docs/useFullscreen.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ Display an element full-screen, optional fallback for fullscreen video on iOS.
55
## Usage
66

77
```jsx
8-
import useFullscreen from 'react-use/lib/useFullscreen';
9-
import useToggle from 'react-use/lib/useToggle';
8+
import {useFullscreen, useToggle} from 'react-use';
109

1110
const Demo = () => {
1211
const ref = useRef(null)

docs/useInterval.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ React hook that allow you using declarative `setInterval`.
66

77
```jsx
88
import * as React from 'react';
9-
import useInterval from 'react-use/lib/useInterval';
9+
import {useInterval} from 'react-use';
1010

1111
const Demo = () => {
1212
const [count, setCount] = React.useState(0);

docs/useKey.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ React UI sensor hook that executes a `handler` when a keyboard key is used.
55
## Usage
66

77
```jsx
8-
import useKey from 'react-use/lib/useKey';
8+
import {useKey} from 'react-use';
99

1010
const Demo = () => {
1111
const [count, set] = useState(0);

docs/useKeyPress.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ key on their keyboard.
77
## Usage
88

99
```jsx
10-
import useKeyPress from 'react-use/lib/useKeyPress';
10+
import {useKeyPress} from 'react-use';
1111

1212
const keys = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];
1313

docs/useKeyPressEvent.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if you press and hold a key, it will fire `keydown` callback only once.
99

1010
```jsx
1111
import React, { useState } from React;
12-
import useKeyPressEvent from 'react-use/lib/useKeyPressEvent';
12+
import {useKeyPressEvent} from 'react-use';
1313

1414
const Demo = () => {
1515
const [count, setCount] = useState(0);

docs/useSpring.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ to spring dynamics.
66
## Usage
77

88
```jsx
9-
import useSpring from 'react-use/lib/useSprint';
9+
import useSpring from 'react-use/lib/useSpring';
1010

1111
const Demo = () => {
1212
const [target, setTarget] = useState(50);

docs/useStartTyping.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ to focus default input field on the page.
66
## Usage
77

88
```jsx
9-
import useStartTyping from 'react-use/lib/useStartTyping';
9+
import {useStartTyping} from 'react-use';
1010

1111
const Demo = () => {
1212
useStartTyping(() => alert('Started typing...'));

0 commit comments

Comments
 (0)