mirror of
https://github.com/streamich/react-use.git
synced 2026-01-18 14:06:52 +00:00
Merge pull request #13 from streamich/demos
docs: ✏️ add useBattery demo
This commit is contained in:
commit
e07aeb8293
13
README.md
13
README.md
@ -31,7 +31,7 @@
|
||||
## Reference
|
||||
|
||||
- [__Sensors__](./docs/Sensors.md)
|
||||
- [`useBattery`](./docs/useBattery.md) — tracks device battery state.
|
||||
- [`useBattery`](./docs/useBattery.md) — tracks device battery state. [![][img-demo]](https://codesandbox.io/s/qlvn662zww)
|
||||
- [`useGeolocation`](./docs/useGeolocation.md) — tracks geo location state of user's device.
|
||||
- [`useHover`](./docs/useHover.md) — tracks mouse hover state of some element.
|
||||
- [`useIdle`](./docs/useIdle.md) — tracks whether user is being inactive.
|
||||
@ -42,19 +42,19 @@
|
||||
- [`useNetwork`](./docs/useNetwork.md) — tracks state of user's internet connection.
|
||||
- [`useOrientation`](./docs/useOrientation.md) — tracks state of device's screen orientation.
|
||||
- [`useSize`](./docs/useSize.md) — tracks some HTML element's dimensions.
|
||||
- [`useWindowSize`](./docs/useWindowSize.md) — tracks `Window` dimensions.
|
||||
- [`useWindowSize`](./docs/useWindowSize.md) — tracks `Window` dimensions. [![][img-demo]](https://codesandbox.io/s/m7ln22668)
|
||||
<br/>
|
||||
<br/>
|
||||
- [__UI__](./docs/UI.md)
|
||||
- [`useAudio`](./docs/useAudio.md) — plays audio and exposes its controls.
|
||||
- [`useSpeech`](./docs/useSpeech.md) — synthesizes speech from a text string.
|
||||
- [`useAudio`](./docs/useAudio.md) — plays audio and exposes its controls. [![][img-demo]](https://codesandbox.io/s/5v7q47knwl)
|
||||
- [`useSpeech`](./docs/useSpeech.md) — synthesizes speech from a text string. [![][img-demo]](https://codesandbox.io/s/n090mqz69m)
|
||||
<br/>
|
||||
<br/>
|
||||
- [__Animations__](./docs/Animations.md)
|
||||
- [`useRaf`](./docs/useRaf.md) — re-renders component on each `reaquestAnimationFrame`.
|
||||
- [`useSpring`](./docs/useSpring.md) — interpolates number over time according to spring dynamics.
|
||||
- [`useTimeout`](./docs/useTimeout.md) — returns true after a timeout.
|
||||
- [`useTween`](./docs/useTween.md) — re-renders component, while tweening a number from 0 to 1.
|
||||
- [`useTween`](./docs/useTween.md) — re-renders component, while tweening a number from 0 to 1. [![][img-demo]](https://codesandbox.io/s/52990wwzyl)
|
||||
<br/>
|
||||
<br/>
|
||||
- [__Side-effects__](./docs/Side-effects.md)
|
||||
@ -90,3 +90,6 @@
|
||||
## License
|
||||
|
||||
[Unlicense](./LICENSE) — public domain.
|
||||
|
||||
|
||||
[img-demo]: https://img.shields.io/badge/demo-%20%20%20%F0%9F%9A%80-green.svg
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
|
||||
Creates `<audio>` element, tracks its state and exposes playback conrols.
|
||||
|
||||
[](https://codesandbox.io/s/5v7q47knwl)
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
|
||||
React sensor hook that tracks batter status.
|
||||
|
||||
[](https://codesandbox.io/s/qlvn662zww)
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
|
||||
React UI hook that synthesizes human voice that speaks a given string.
|
||||
|
||||
[](https://codesandbox.io/s/n090mqz69m)
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
|
||||
React animation hook that tweens a number between 0 and 1.
|
||||
|
||||
[](https://codesandbox.io/s/52990wwzyl)
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
|
||||
React sensor hook that tracks dimensions of the browser window.
|
||||
|
||||
[](https://codesandbox.io/s/m7ln22668)
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user