xobotyi
a6c2d65a35
fix typo;
2019-08-27 00:01:46 +03:00
xobotyi
438a56606b
make useTimeoutFn work properly:
...
- reset function should clear previous timeout;
- function change should not reset the timeout;
2019-08-26 09:58:28 +03:00
Paul Sachs
6c3e569db6
feat: add usePreviousDistinct ( #551 )
...
* feat: add usePreviousDistinct
* Cleanup
* Added storybook docs
* improve demo in docs
2019-08-25 21:20:44 +02:00
Vadim Dalecky
55b6cad1d0
Merge pull request #559 from d-asensio/add_use_state_wheel
...
feat: add useStateList
2019-08-25 20:00:12 +02:00
David Asensio Cañas
8d84340ad4
feat: add useCircularIterate
2019-08-25 13:55:11 +02:00
Vadim Dalecky
a6ee928471
Merge pull request #561 from streamich/fix-#550
...
fix: make useLockBodyScroll support iframes
2019-08-25 13:39:50 +02:00
streamich
3bb525a5e1
docs: ✏️ fix Storybook useHarmonicIntervalFn() link
2019-08-25 13:05:10 +02:00
streamich
e6dd5de395
docs: ✏️ add useHarmonicIntervalFn() hook documentations
2019-08-25 13:03:01 +02:00
streamich
d9f21e30e1
feat: 🎸 add useHarmonicIntervalFn() hook
2019-08-25 12:52:03 +02:00
xobotyi
2617d74b8a
fix : #550
2019-08-25 07:41:33 +03:00
xobotyi
9577d63ec2
editorconfig:
...
- typescript rules separated from others;
- more alignment rules;
2019-08-24 01:57:29 +03:00
Vadim Dalecky
0275329df6
fix(useSetState): memoize setState callback
2019-08-23 21:01:52 +02:00
Vadim Dalecky
d7a622d7cf
fix: correct useSpring() hook behaviour
...
Add tests for "Animation" block.
2019-08-23 20:54:14 +02:00
Tyler Swavely
c60ee96be1
chore(useSetState): check useSetState for memoized callback
2019-08-23 10:35:05 -07:00
Tyler Swavely
16f023fc66
fix(useSetState): memoize setState callback
2019-08-23 00:02:35 -07:00
Mitchell Heddles
99cb994d45
Fixed ref type definition
2019-08-23 16:23:46 +10:00
Mitchell Heddles
698399938d
Removed prepended window from setTimeout
2019-08-23 16:08:04 +10:00
Mario Beltrán Alarcón
1f28a76fc3
Add useTween tests
2019-08-22 23:23:12 +02:00
Mario Beltrán Alarcón
115fd73957
Get updated useTimeout tests and remove unnecessary outer describe block
2019-08-22 22:12:03 +02:00
Mario Beltrán Alarcón
5c50ad39da
Merge branch 'original-master' into animation-block-tests
...
# Conflicts:
# src/__tests__/useTimeout.test.ts
2019-08-22 22:10:59 +02:00
Mario Beltrán Alarcón
a510fedead
Fix tslint errors
2019-08-22 01:03:02 +02:00
Mario Beltrán Alarcón
08f524f346
Fix useRaf tests
...
After update to react v16.9 and react-testing-library v9 with improved async stuff for testing, timers work slightly different and need to be set inside act.
2019-08-22 01:00:45 +02:00
xobotyi
d4164998e2
useTimeout:
...
- `useTimeoutFn` based implementation (as a special case of it);
- improved docs;
- added tests;
2019-08-22 01:18:40 +03:00
xobotyi
210ea60595
useTimeoutFn implementation;
2019-08-22 00:49:02 +03:00
Mario Beltrán Alarcón
86355db002
Merge branch 'original-master' into animation-block-tests
...
# Conflicts:
# package.json
# yarn.lock
2019-08-21 23:42:10 +02:00
Mario Beltrán Alarcón
3c43c4b05d
Add useSpring tests
2019-08-21 23:36:50 +02:00
Vadim Dalecky
09167df364
fix: succeed useRafLoop tests
2019-08-20 23:43:13 +02:00
streamich
6e5cfaccef
chore: 🤖 fix master build
2019-08-20 23:37:42 +02:00
xobotyi
be950bbc41
Fix useRafLoop tests. Now it always succeed.
2019-08-21 00:31:18 +03:00
Vadim Dalecky
106906013f
fix: Reworked useBattery hook
2019-08-20 23:25:05 +02:00
xobotyi
ed5f277b0b
Simpler navigator detection (still SSR compatible);
2019-08-20 23:44:11 +03:00
Vadim Dalecky
aae806deb9
Mark useRefMounted as deprecated ( #539 )
...
Mark useRefMounted as deprecated
2019-08-20 22:35:27 +02:00
streamich
2d0fabf9ac
feat: 🎸 use only one useState and one useEffect call
2019-08-20 20:17:55 +02:00
streamich
5d31cf0dbc
feat: 🎸 support useBattery hook on server side
2019-08-20 19:40:22 +02:00
xobotyi
4a7fe73405
fix useAsyncFn tests warnings;
2019-08-20 13:33:42 +03:00
xobotyi
8886f2b885
fix useAsync tests warnings;
2019-08-20 13:19:25 +03:00
xobotyi
61b0355e5c
useRefMounted deprecation;
2019-08-20 00:58:41 +03:00
xobotyi
0e9894d28e
Rework vol.2 =)
...
Added fetching indicator;
Fixed isMounted state;
Mock function returned for browsers not supporting the Battery API;
Using react-fast-compare to avoid useless updates;
2019-08-20 00:50:59 +03:00
Vadim Dalecky
a7c2899382
feat: add useUpsert
2019-08-19 18:22:02 +02:00
Vadim Dalecky
2f70dc261d
fix: return from useUpdateEffect
2019-08-19 17:58:58 +02:00
Vadim Dalecky
bd3a0622a1
fix: allow import default for ESM
2019-08-19 17:52:05 +02:00
xobotyi
310fb6dc55
Reworked useBattery hook;
...
Fix : #308 ;
2019-08-19 12:06:20 +03:00
尽龙
8b24df411b
fix: useUpdateEffect add return
2019-08-19 15:14:38 +08:00
尽龙
b3e672b66c
fix: rollup build error: Cannot call a namespace ('writeText')
2019-08-19 11:07:58 +08:00
Vadim Dalecky
8224badfc5
Merge pull request #514 from brickspert/master
...
fix: useUpdateEffect run on the wrong time
2019-08-17 22:34:36 +02:00
Vadim Dalecky
66b175dbff
refactor: use useMountedState instead of useRefMounted
2019-08-17 18:26:15 +02:00
Vadim Dalecky
586faabe74
feat: add min/max to useNumber
2019-08-17 18:18:20 +02:00
koen
05beb6df23
Fix IE support for useMouse
2019-08-15 09:25:02 +02:00
xobotyi
58a816c4f8
Replaced all useRefMounted to useMountedState to deprecate first one in later releases;
2019-08-14 03:46:03 +03:00
xobotyi
12608fe5be
Make useMountedState return a single function instead of a new one each time;
2019-08-14 03:33:11 +03:00