Skip to content

Commit

Permalink
Unify imports in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkcz committed Jul 17, 2019
1 parent 17dd1f1 commit d3d5bc9
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions docs/useEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ React sensor hook that subscribes a `handler` to events.
## Usage

```jsx
import useEvent from 'react-use/lib/useEvent';
import useList from 'react-use/lib/useList';
import {useEvent, useList} from 'react-use';

const Demo = () => {
const [list, {push, clear}] = useList();
Expand Down
3 changes: 1 addition & 2 deletions docs/useFullscreen.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ Display an element full-screen, optional fallback for fullscreen video on iOS.
## Usage

```jsx
import useFullscreen from 'react-use/lib/useFullscreen';
import useToggle from 'react-use/lib/useToggle';
import {useFullscreen, useToggle} from 'react-use';

const Demo = () => {
const ref = useRef(null)
Expand Down
2 changes: 1 addition & 1 deletion docs/useInterval.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ React hook that allow you using declarative `setInterval`.

```jsx
import * as React from 'react';
import useInterval from 'react-use/lib/useInterval';
import {useInterval} from 'react-use';

const Demo = () => {
const [count, setCount] = React.useState(0);
Expand Down
2 changes: 1 addition & 1 deletion docs/useKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ React UI sensor hook that executes a `handler` when a keyboard key is used.
## Usage

```jsx
import useKey from 'react-use/lib/useKey';
import {useKey} from 'react-use';

const Demo = () => {
const [count, set] = useState(0);
Expand Down
2 changes: 1 addition & 1 deletion docs/useKeyPress.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ key on their keyboard.
## Usage

```jsx
import useKeyPress from 'react-use/lib/useKeyPress';
import {useKeyPress} from 'react-use';

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

Expand Down
2 changes: 1 addition & 1 deletion docs/useKeyPressEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if you press and hold a key, it will fire `keydown` callback only once.

```jsx
import React, { useState } from React;
import useKeyPressEvent from 'react-use/lib/useKeyPressEvent';
import {useKeyPressEvent} from 'react-use';

const Demo = () => {
const [count, setCount] = useState(0);
Expand Down
2 changes: 1 addition & 1 deletion docs/useSpring.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ to spring dynamics.
## Usage

```jsx
import useSpring from 'react-use/lib/useSprint';
import useSpring from 'react-use/lib/useSpring';

const Demo = () => {
const [target, setTarget] = useState(50);
Expand Down
2 changes: 1 addition & 1 deletion docs/useStartTyping.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ to focus default input field on the page.
## Usage

```jsx
import useStartTyping from 'react-use/lib/useStartTyping';
import {useStartTyping} from 'react-use';

const Demo = () => {
useStartTyping(() => alert('Started typing...'));
Expand Down

0 comments on commit d3d5bc9

Please sign in to comment.