streamich
7c38165ac8
feat: 🎸 improve useFullscreen hook
2019-03-28 22:26:38 +01:00
streamich
0f0d7fbef4
chore: 🤖 merge useFullscreen
2019-03-28 21:03:04 +01:00
streamich
f4fd748d45
feat: 🎸 add createRenderProp function for creating render-props
2019-03-28 19:52:33 +01:00
Va Da
565d2e98aa
Merge branch 'master' into next
2019-03-28 19:37:46 +01:00
streamich
aa277b805c
feat: 🎸 return events from useKeyboardJs hook
2019-03-28 19:35:00 +01:00
streamich
c0658f605f
feat: 🎸 refactor useKeyPressEvent hook
...
Changes its interface, fixes bug of calling callback on initial mount,
useKeyPress hook is injected as dependency and can be overwirtten to
useKeyboardJs.
BREAKING CHANGE: 🧨 useKeyPressEvent hook modified for dependency injection and providing
event objects to user
2019-03-28 19:28:19 +01:00
streamich
00fecab325
feat: 🎸 keep keyboard events in useKeyPress hook
2019-03-28 19:11:25 +01:00
streamich
5c95f28521
fix: 🐛 fix TypeScript build errors
2019-03-28 19:01:23 +01:00
streamich
3516aa69a9
feat: 🎸 add useKeyboardJs hook
2019-03-28 18:59:09 +01:00
streamich
d5de21285c
docs: ✏️ add useKey and useKeyPress documentation
2019-03-28 18:07:54 +01:00
streamich
727743bb1f
feat: 🎸 useKeyPress hook now uses useKey, KeyboardJS removed
...
BREAKING CHANGE: 🧨 KeyboardJS now available anymore in useKeyPress hook, instead it will be
a separate useKeyPressKJ hook.
2019-03-28 17:57:16 +01:00
streamich
299fd86469
feat: 🎸 add useKey hook
2019-03-28 17:52:53 +01:00
streamich
2a13cfbf68
feat: 🎸 add useEvent hook
2019-03-28 16:02:56 +01:00
ZHAO Jinxiang
929e72679b
fix: fix deps arg and union type in useAsync and useAsyncRetry
2019-03-28 22:32:35 +08:00
streamich
b20cf7c18a
feat: 🎸 add clear() to useList, use fn for state updates
2019-03-28 15:14:31 +01:00
Ward Oosterlijnck
8eb66288a1
Merge branch 'master' into useFullscreen
2019-03-29 00:07:27 +11:00
Ward Oosterlijnck
bf302bd5e7
useFullscreen added to readme
2019-03-28 23:49:42 +11:00
Ward Oosterlijnck
0971a7e6b2
useFullscreen
2019-03-28 23:34:32 +11:00
streamich
676d0ded3e
feat: 🎸 add useDropArea hook
2019-03-27 23:05:46 +01:00
Ward Oosterlijnck
4fda5bba7d
discard intermediary calls
2019-03-28 08:30:27 +11:00
streamich
0ccdf9531e
feat: 🎸 add useThrottleFn hook that throttles function
...
This hook used to be called useThrottle, but it also was re-implemented.
2019-03-27 22:22:27 +01:00
streamich
452e8d9425
feat: 🎸 simplify and improve useThrottle hook
...
Create a version of the hook that simply throttled a value, hook that
throttles a function will be called useThrottleFn.
BREAKING CHANGE: 🧨 useThrottle is now a completely different hook
2019-03-27 21:10:57 +01:00
streamich
6b487c0e65
docs: ✏️ add useDrop hook reference
2019-03-27 20:05:59 +01:00
streamich
acc355cfa4
fix: 🐛 track "over" state better in useDrop hook
2019-03-27 19:57:18 +01:00
streamich
6e415cfdef
feat: 🎸 add useDrop hook
2019-03-27 19:34:33 +01:00
streamich
6655092cae
fix: 🐛 make sure all paths in usePageLeave return
2019-03-27 19:21:13 +01:00
streamich
33ac91b775
feat: 🎸 add usePageLeave hook
2019-03-27 19:19:39 +01:00
Va Da
c9d7b5210a
Merge branch 'master' into useThrottle
2019-03-26 11:48:58 +01:00
Ward Oosterlijnck
c51eb7fe6a
args optional
2019-03-26 21:43:27 +11:00
Va Da
8060688cde
Merge branch 'master' into v6
2019-03-26 11:24:51 +01:00
streamich
8b0580e98b
feat: 🎸 move extra mouse functionality into useMouseHovered
2019-03-26 11:20:42 +01:00
streamich
9bb02a1b93
feat: 🎸 add {bound} option to useMouse
2019-03-26 11:20:42 +01:00
streamich
f5faba515d
fix: 🐛 don't throw only in development
...
Throwing changes behaviour of the code, other code may rely on this
behaviour, so we either throw in all environments or console.error
instead.
BREAKING CHANGE: 🧨 error is logged instead of thrown in development environment
2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
2b3dd239cb
Make useHoverDirty controllable + reuse in useMouse
2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
28b5bc97d4
useMouse whenHovered option
2019-03-26 11:20:42 +01:00
ShizukuIchi
b88707554f
feat: more precise size for useMouse
2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
8bf149794b
useScroll cancel animation frame in handler
2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
2fd1d673e0
remove event listener + cancel animation frame in handler
2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
e8b43ea95c
useMouse hook
2019-03-26 11:20:42 +01:00
streamich
5dd10e91ee
feat: 🎸 keep global state of all useLockBodyScroll hooks
...
This change will keep document body locked as long as at least one hook
is enabled on the page. Maybe it makes sense to generalize this logic
for other side-effect hooks. One such hook could be useBlurBody that
blurs page - useful for modals and overlays.
2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
5740a53f35
useLockBodyScroll
2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
a4f0197161
Add debounced value to demo and docs
2019-03-26 20:08:35 +11:00
Ward Oosterlijnck
e6f179d682
useThrottle
2019-03-26 20:00:37 +11:00
Wes Souza
b72c098694
fix: types for useGeolocation
2019-03-25 23:39:31 -04:00
ShizukuIchi
1761031e1b
feat: more precise size for useMouse
2019-03-26 03:49:19 +08:00
Va Da
17dfa8e647
feat: add useMouse hook
2019-03-25 14:02:06 +01:00
streamich
a03143a46f
feat: 🎸 implement useClickAway, remove useOutsideClick
...
This re-implements outside click hook functionality from scratch,
removes dependency on use-onoutsideclick package.
BREAKING CHANGE: 🧨 useOutsideClick is now useClickAway
2019-03-25 13:52:52 +01:00
streamich
428876ab34
chore: 🤖 move useCss hook under UI section
...
Also remove remainders of useCallbag hook.
2019-03-25 13:23:49 +01:00
streamich
61700675cd
chore: 🤖 don't install only large dependencies
...
This change removes useCallbag hook, it also reverts back changes for
hooks that only have tiny dependencies or dependencies that could have
been part of the hook itself. Effectivly only KeyboardJS and Rebound are
large packages that only partially are used by react-use, hence require
user to install them separately.
BREAKING CHANGE: 🧨 useCallbag hook is removed, some hooks KeyboardJS and Rebound installed
separately
2019-03-25 13:19:37 +01:00
Ward Oosterlijnck
7b3e4d303c
useScroll cancel animation frame in handler
2019-03-25 23:16:31 +11:00