Skip to content

Commit

Permalink
feat: bump useWait
Browse files Browse the repository at this point in the history
  • Loading branch information
f authored and streamich committed Nov 10, 2018
1 parent 6f86b9e commit 124ef99
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/useWait.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `useWait`

React waiting management hook.
`useWait` is a React Hook helps to manage multiple loading states on the page without any conflict. It's based on a very simple idea that manages an `Array` of multiple loading states. The built-in `Wait` component listens its registered loader and immediately become loading state.

## Usage

Expand All @@ -15,7 +15,7 @@ function UserCreateButton() {
onClick={() => startWaiting("creating user")}
disabled={isWaiting("creating user")}
>
<Wait message="creating user" waiting={<div>Creating user!</div>}>
<Wait on="creating user" fallback={<div>Creating user!</div>}>
Create User
</Wait>
</button>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"ts-easing": "^0.1.0",
"use-onclickoutside": "^0.1.0",
"use-callbag": "^0.1.2",
"use-wait": "^0.0.3"
"react-wait": "^0.3.0"
},
"devDependencies": {
"@storybook/react": "^3.4.11",
Expand Down
2 changes: 1 addition & 1 deletion src/__stories__/useWait.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Demo = () => {
return (
<div>
<button disabled={isWaiting('creating user')} onClick={createUser}>
<Wait message="creating user" waiting={<b>Creating User...</b>}>
<Wait on="creating user" fallback={<b>Creating User...</b>}>
Create User
</Wait>
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/useWait.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Waiter, useWait } from 'use-wait'
import { Waiter, useWait } from 'react-wait'

useWait.Waiter = Waiter;

Expand Down

0 comments on commit 124ef99

Please sign in to comment.