Skip to content

Commit

Permalink
feat(useWait): add deprecation messages to readme and export;
Browse files Browse the repository at this point in the history
  • Loading branch information
xobotyi committed Oct 30, 2019
1 parent 58ddea3 commit d338245
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
- [`useFullscreen`](./docs/useFullscreen.md) — display an element or video full-screen. [![][img-demo]](https://streamich.github.io/react-use/?path=/story/ui-usefullscreen--demo)
- [`useSpeech`](./docs/useSpeech.md) — synthesizes speech from a text string. [![][img-demo]](https://codesandbox.io/s/n090mqz69m)
- [`useVideo`](./docs/useVideo.md) — plays video, tracks its state, and exposes playback controls. [![][img-demo]](https://streamich.github.io/react-use/?path=/story/ui-usevideo--demo)
- [`useWait`](./docs/useWait.md) — complex waiting management for UIs.
- ~~[`useWait`](./docs/useWait.md) — complex waiting management for UIs.~~ _Deprecated_: will be removed soon
<br/>
<br/>
- [**Animations**](./docs/Animations.md)
Expand Down Expand Up @@ -111,7 +111,7 @@
- [`useEffectOnce`](./docs/useEffectOnce.md) &mdash; a modified [`useEffect`](https://reactjs.org/docs/hooks-reference.html#useeffect) hook that only runs once.
- [`useEvent`](./docs/useEvent.md) &mdash; subscribe to events.
- [`useLifecycles`](./docs/useLifecycles.md) &mdash; calls `mount` and `unmount` callbacks.
- [`useMountedState`](./docs/useMountedState.md) and [`useRefMounted`](./docs/useRefMounted.md) &mdash; track if component is mounted.
- [`useMountedState`](./docs/useMountedState.md) ~~and [`useRefMounted`](./docs/useRefMounted.md)~~ &mdash; track if component is mounted.
- [`usePromise`](./docs/usePromise.md) &mdash; resolves promise only while component is mounted.
- [`useLogger`](./docs/useLogger.md) &mdash; logs in console as component goes through life-cycles.
- [`useMount`](./docs/useMount.md) &mdash; calls `mount` callbacks.
Expand Down
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export { default as useRaf } from './useRaf';
export { default as useRafLoop } from './useRafLoop';
export { default as useRafState } from './useRafState';
/**
* @deprecated This hook is obsolete, use `useMountedState` instead
* @deprecated This hook is obsolete and Will be removed soon, use `useMountedState` instead
*/
export { default as useRefMounted } from './useRefMounted';
export { default as useSearchParam } from './useSearchParam';
Expand Down Expand Up @@ -93,6 +93,9 @@ export { default as useUpsert } from './useUpsert';
export { default as useVideo } from './useVideo';
export { default as useStateValidator } from './useStateValidator';
export { useMultiStateValidator } from './useMultiStateValidator';
/**
* @deprecated Will be removed soon
*/
export { useWait, Waiter } from './useWait';
export { default as useWindowScroll } from './useWindowScroll';
export { default as useWindowSize } from './useWindowSize';
Expand Down
7 changes: 4 additions & 3 deletions src/useWait.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useWait, Waiter } from 'react-wait';

export { useWait, Waiter };
/**
* @deprecated Will be removed soon
*/
export { useWait, Waiter } from 'react-wait';

0 comments on commit d338245

Please sign in to comment.