369 Commits

Author SHA1 Message Date
Mahmoud El-Gammal
3eb531ac9e feat: add onChange callback to useWindowSize 2024-12-02 16:51:00 +02:00
atiteux
75218e45df feat(pencil): add isFirst and isLast return value to 'useStateList' 2024-01-22 11:11:34 +01:00
Va Da
05346481a1
fix: typo in example 2024-01-21 10:57:55 +01:00
suisous
d4e671dfca Update useSet docs 2024-01-05 15:07:04 +09:00
Schalk Venter
7a2fc183c9
Fixes possible typo in example 2023-10-10 09:19:38 +02:00
se-ul
cb5dca6ab1
docs: fix typo in usePinchZoom (#2394) 2022-10-12 12:04:16 +02:00
Abhishek Mittal
af8d46e0c3 added usePinchZoom sensor hook 2022-05-04 14:06:49 +05:30
Teague Stockwell
5c01189412
fix: useMedia SSR hydration bug with defaultState (#2216)
* fix: useMedia SSR hydration bug with defaultState

Prevent a React hydration mismatch when a default value is provided
by not defaulting to window.matchMedia(query).matches.

* Refactor nested ifs
2021-12-30 15:31:24 +01:00
Vadim Dalecky
35f64d60ef
docs: Update Usage.md 2021-08-31 21:13:11 +02:00
longwanxiang
3203610efd feat: useAudio add playing state 2021-08-27 18:28:04 +08:00
Waste-Brain
27af3f621c
Update Usage.md
The method of import seems wrong
2021-06-15 23:34:20 +08:00
Anton Zinovyev
4e07c7ebc8
Merge pull request #1574 from lmichelin/patch-1
docs: Fix useAsyncFn example to avoid error
2021-04-06 11:35:17 +03:00
Juan Lulkin
245e11681c Adds docs for the new API 2021-02-15 21:07:33 +01:00
xobotyi
94e2a807c6
chore: clarification about useMountedState hook. 2021-02-10 23:02:59 +03:00
xobotyi
23037f207d
feat: refactor the useNetwork hook.
Improved hook performance, now works with safari.

BREAKING CHANGE: `useNetwork` hook renamed to `useNetworkState`.
2021-01-31 03:14:20 +03:00
Renovate Bot
a27f09fd36
chore: refactoring and rearrangement.
More DRY code. Also move non-hooks to separate directories.

BREAKING CHANGE: all `create*` factories been moved to `factory` subdirectory and in case direct import should be imported like `react-use/esm/factory/createBreakpoint`
BREAKING CHANGE: `comps` directory renamed to `component`
2021-01-30 23:30:26 +03:00
Nicolas Girault
6e3a73a1e6
Fix typo 2020-12-31 20:30:46 +01:00
Louis-Marie Michelin
45559ffe78 docs: Fix useAsyncFn example to avoid error 2020-10-15 23:36:31 +02:00
Filipe Marins
77d34867fb
Rename useEffectOnce to useLifecycles on documentation example (#1427) 2020-08-07 15:05:32 +10:00
tkwant
d714b12e8b feat: add useMouseWheel hook 2020-06-05 22:50:34 +02:00
streamich
e33cf9f87b chore: 🤖 catch up with master 2020-05-18 16:03:20 +02:00
Vadim Dalecky
4aa573dfeb
Merge branch 'master' into feature/correct-spelling 2020-05-16 15:58:12 +02:00
streamich
e1dbd39f18 chore: 🤖 catch up with master 2020-05-16 14:59:21 +02:00
streamich
1e74bdcf48 docs: ✏️ add useScratch to docs 2020-05-16 14:29:24 +02:00
Clément Paris
d6fe267615 feat: add useLatest hook 2020-05-10 18:09:30 +02:00
whincwu
44a6cde00e feat: add useHash hook 2020-04-08 09:21:06 +03:00
xobotyi
baa2f7511e
feat(useRafLoop): reworked the hook, now it do not re-render parent component.
BREAKING CHANGE: changed return array, now it returns only functions in next order: [stop, start, isActive].

Parent component is not re-rendered on loop start/stop.
2020-04-01 10:43:31 +03:00
xobotyi
1ef1272d6d
feat(useRafLoop): implement #1090 2020-04-01 08:49:05 +03:00
Mike Rogers
e4eec7bf63 correcting spelling mistakes 2020-03-05 11:36:43 +00:00
Octave Raimbault
477614f9ef
feat(useSet): add toggle a method (#968)
Co-authored-by: Ward <wardoosterlijnck@gmail.com>
2020-03-03 14:00:40 +11:00
Justin Conner
d4489d0644 Renames Animation.md file to Animations.md 2020-02-29 04:33:54 +03:00
Mikael Finstad
f049d9151e
Fix typos and doc error 2020-02-20 17:53:00 +08:00
streamich
3ca5251c2e chore: 🤖 catch up with master 2020-02-17 22:40:41 +01:00
LittleboyHarry
4464832875
Update useCounter.md
Fixed error parameter name.
2020-02-16 10:31:02 +08:00
Vadim Dalecky
a2c26a2b68
Merge pull request #910 from ayush987goyal/pr/use-methods
feat: add useMethods state hook
2020-02-15 15:25:05 +01:00
Ayush Goyal
7554b9a61e feat: add useMethods state hook 2020-02-15 19:24:48 +05:30
streamich
f60ed427a3 chore: 🤖 catch up with master 2020-02-15 14:50:44 +01:00
Vadim Dalecky
290c87313a
Merge pull request #750 from mvargeson/fix-lifecycle-hooks-broken-href
docs: rename docs/Lifecycle.md to match README.md
2020-02-15 14:48:00 +01:00
Vadim Dalecky
5ea486edf1
Merge pull request #867 from bebbi/feat/before-unload-callback
feat(useBeforeUnload): allow passing a dirty function (#842)
2020-02-15 14:10:30 +01:00
streamich
6ddc6332f8 chore: 🤖 catch up with master 2020-02-04 01:36:30 +01:00
streamich
7c93cd1236 chore: 🤖 catch up with master 2020-02-04 01:27:02 +01:00
Vadim Dalecky
fda7199b7d
feat: add createGlobalState hook generator 2020-02-03 16:20:07 -08:00
Vadim Dalecky
54ac91b28d
feat: keep previous state in useAsyncFn
BREAKING CHANGE: useAsyncFn now keeps hold of old result/error when called multiple times
2020-02-03 16:12:50 -08:00
streamich
2e91e5396e chore: 🤖 catch up with master 2020-02-03 23:09:33 +01:00
Josmar Dias
2005535518
docs: useCustomCompareEffect should import itself (#909) 2020-01-30 14:51:18 +03:00
carlos
062e60663d Resolve #934: useAsyncFn: keeping the previous state when start running the async function 2020-01-30 18:03:54 +08:00
Guillaume L
f06895d9d5 [FIX] typo in useStateList.md (#923)
`nexct` --> `next`
2020-01-27 17:46:37 +03:00
Kuss
57b904118e fix: Fail testing and update doc 2020-01-24 19:04:39 +08:00
Kuss
a0d61b5ea1 optional parameter and update test 2020-01-24 17:27:58 +08:00
Kuss
45681b88e3 feat: add useLongPress hook 2020-01-23 13:03:45 +08:00