358 Commits

Author SHA1 Message Date
xobotyi
14a60c97dc Decrease amount of required calls (machine could be busy); 2019-08-03 02:18:10 +03:00
xobotyi
2299646c57 No sense to pass deps due to we can observe the callback itself. 2019-08-03 02:13:12 +03:00
xobotyi
6d55666aa7 useRafLoop - React hook that calls given function inside the RAF loop. 2019-07-30 23:14:08 +03:00
Vadim Dalecky
ade0557de7
feat: add useDefault hook 2019-07-26 22:09:56 +02:00
leonardohabitzreuter
4e469c3ac6 useDefault hook 2019-07-22 15:36:34 -03:00
jeemyeong
5987cc82cc feat: useWindowScroll - for cross-browser compatibility
For cross-browser compatibility, use window.pageYOffset instead of window.scrollY.
(https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY)
2019-07-22 20:44:55 +09:00
Vinícius Tabille Manjabosco
9e9745160d fix: useMouse & useMouseHovered type definitions for SVG 2019-07-21 20:37:54 +02:00
Vadim Dalecky
6ebe3bba85
feat: add latest react-wait types 2019-07-17 17:28:56 +02:00
Spencer Elliott
38622ec5a6 Export useWait and Waiter 2019-07-17 10:41:20 -04:00
Daniel K
17dd1f141a Remove peer deps 2019-07-17 08:27:21 +02:00
Vadim Dalecky
6645ed940a
feat: add useInterval hook 2019-07-17 00:58:00 +02:00
streamich
40b33dabed fix: 🐛 fix useDebounce import 2019-07-17 00:21:06 +02:00
streamich
599efdb6b6 chore: 🤖 add component useInterval to README, improve demo 2019-07-17 00:19:50 +02:00
Ward Oosterlijnck
9ea027539e docs: async hooks docs and stories update 2019-07-17 01:41:00 +10:00
Vadim Dalecky
50a5160081
fix: support useMedia usage server-side 2019-07-16 12:09:46 +02:00
Ward Oosterlijnck
f1c0987f87 Example with dependency with a delay value slider 2019-07-16 19:47:50 +10:00
Ward Oosterlijnck
a57fb0325e Isomorphic useMedia 2019-07-16 19:07:39 +10:00
Andrew Bazhanov
9780545d6e fix: createReducer stable dispatch function identity
stable dispatch function identity so it won’t change on re-renders
2019-07-16 18:40:08 +10:00
Matt Leonowicz
eeb55e4927
useMedia - initialize state with call to media query
Initializing state with result from call to window.matchMedia avoids possible initial flicker of returned value, when media query matched initially
2019-07-11 15:19:17 +02:00
yangyi
fd7cda62e1
Merge branch 'master' into master 2019-07-11 16:36:03 +08:00
liyangyi
342150bfe6 useDebounce should not trigger the callback function at the first invocation(e.g on mount) 2019-07-11 16:31:45 +08:00
liyangyi
41f9bc6999 add useInterval hook 2019-07-11 11:17:25 +08:00
Vadim Dalecky
c4f5f16120
test: typo in useObservable test 2019-07-10 15:27:50 +02:00
Vadim Dalecky
8dcbbf16cf
feat: expose useIsomorphicLayoutEffect + docs (#451)
Export useIsomorphicLayoutEffect + docs
2019-07-10 15:04:39 +02:00
Ward
588a0c5d23
feat: usePermission
Hook to query permission status of browser API's
2019-07-10 21:28:09 +10:00
Ward Oosterlijnck
02ed947c5d docs: useDeepCompareEffect category 2019-07-10 20:53:31 +10:00
Ward Oosterlijnck
192c9838b3 Export useIsomorphicLayoutEffect + docs 2019-07-10 20:47:52 +10:00
Ward
e2b8278812
fix: useLocalStorage types for functional updates
Fix useLocalStorage types for functional updates
2019-07-10 20:15:14 +10:00
streamich
3f335b2ef1 style: 💄 fix Prettier "error" 2019-07-08 11:42:44 +02:00
Vadim Dalecky
a9e3bab280
fix: iframe can be null 2019-07-07 15:42:38 +02:00
Manoj Bahuguna
c9b5cdca42 fix(useSize): prevents accessing iframe's property when it's not defined
ref #442
2019-07-04 18:04:51 +00:00
Charles-Axel Dein
5f5376c64e
Fix useLocalStorage types for functional updates
Fixes #438
2019-07-04 09:51:25 +02:00
allen
e0618815af modify text 2019-07-02 13:08:53 +08:00
streamich
409dbdca38 style: 💄 run Prettier 2019-06-30 12:46:19 +02:00
Vadim Dalecky
8c2c4ef3e8
useMap uses previous map state upon set and remove (#423)
useMap uses previous map state upon set and remove
2019-06-30 12:42:47 +02:00
streamich
1353b6c125 fix: 🐛 fix test and add pre-push hook 2019-06-30 12:37:00 +02:00
Vadim Dalecky
c32d02be02
feat: add voice option in useSpeech (#422)
feat: add voice option in useSpeech
2019-06-30 12:23:07 +02:00
nmccready
0a59869e83 fix(useMap): remove now also uses prevMap state to not overwrite or lose state 2019-06-27 11:56:14 -04:00
streamich
f0b8053700 style: 💄 run Prettier 2019-06-27 12:48:58 +02:00
nmccready
7ce8e4f962 fix: lint fixes via lint:fix 2019-06-26 17:01:54 -04:00
nmccready
3554f79449 fix: useMap uses prevMap state which is safer 2019-06-26 16:59:01 -04:00
allen
6dc2dd572b feat: add voice option in use speech 2019-06-27 01:19:02 +08:00
allen
4da40b9cbb feat: add usePermission 2019-06-27 00:57:38 +08:00
James Jackson
9a0316ea90
Update useLocalStorage.ts 2019-06-25 23:12:41 -04:00
xiaoboost
7ff5475e89 should use pure function 2019-06-25 09:15:06 +08:00
streamich
007f684dec test: 💍 improve useObservable test 2019-06-23 12:45:59 +02:00
streamich
376eea322d fix: 🐛 use synchronouse effect to subscribe to observables 2019-06-23 11:58:51 +02:00
Vadim Dalecky
c60df19ebc
feat: improve useClickAway() hook (#394) 2019-06-19 15:10:44 +02:00
Vadim Dalecky
8bd7ca9fac
Add useScrolling hook (#374)
Add useScrolling hook
2019-06-18 17:43:11 +02:00
James
760edf1695 feat: add useScrolling story 2019-06-17 11:09:20 +01:00