diff --git a/docs/useWait.md b/docs/useWait.md index 1035d182ab..779d7590e9 100644 --- a/docs/useWait.md +++ b/docs/useWait.md @@ -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 @@ -15,7 +15,7 @@ function UserCreateButton() { onClick={() => startWaiting("creating user")} disabled={isWaiting("creating user")} > - Creating user!}> + Creating user!}> Create User diff --git a/package.json b/package.json index ba54f8eac8..874f25729f 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/__stories__/useWait.story.tsx b/src/__stories__/useWait.story.tsx index 1358ac5ce0..4ee807a74c 100644 --- a/src/__stories__/useWait.story.tsx +++ b/src/__stories__/useWait.story.tsx @@ -23,7 +23,7 @@ const Demo = () => { return (
diff --git a/src/useWait.ts b/src/useWait.ts index 4551309c44..ffa4c64803 100644 --- a/src/useWait.ts +++ b/src/useWait.ts @@ -1,4 +1,4 @@ -import { Waiter, useWait } from 'use-wait' +import { Waiter, useWait } from 'react-wait' useWait.Waiter = Waiter;