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
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
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
ef67d28654
refactor: 💡 use fast-deep-equal for deep comparisons
2020-02-15 12:02:57 +01:00
Ayush Goyal
67d65833d9
chore: disable eslint for affected files
2020-02-04 07:12:19 +05:30
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
dizel3d
4f6d3887be
fix(useIntersection): return null if IntersectionObserver is not supported
2020-01-28 00:26:08 +03:00
dizel3d
3f8687e1f5
fix(useIntersection): reset an intersectionObserverEntry when the ref changes
2020-01-28 00:25:57 +03:00
dizel3d
ac2f54a8f6
fix(useIntersection): disconnect an old IntersectionObserver instance when the ref changes
2020-01-27 23:57:36 +03: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
Mateusz Leonowicz
dc07e0e3b9
add setAll instead of overloading reset
2020-01-17 15:56:37 +00:00
Ayush Goyal
65f3644205
feat: add useError hook
2020-01-16 21:13:35 +05:30
Ayush Goyal
5316510bab
feat: add serializer/deserializer option to useLocalStorage
2020-01-15 23:14:17 +05:30
Vadim Dalecky
b8b3e479ce
feat: add option to useTitle to restore title on un-mount
2020-01-14 07:28:45 -08:00
zsh2401
8faa71f9ac
useTitle could restore title optionally
2020-01-14 14:47:58 +08:00
Brendan Daoud
6d61c1d95a
Merge branch 'master' into pr/useStateContext
2020-01-13 18:08:09 +01:00
Ayush Goyal
69c698afea
chore: fix act warning in useAsync tests
...
* fix: act warning in useAsync.test
* fix: remove the comment
2020-01-13 07:55:09 -08:00
Brendan
9911106f8f
Test for thrown error
2020-01-13 14:17:58 +01:00
Brendan
bc74530f35
Add create reducer context
2020-01-13 14:01:21 +01:00
Brendan
e34ee0e66c
Allow initial value override
2020-01-13 13:32:24 +01:00
Brendan
7285f7dc7a
Add createStateContext
2020-01-13 13:09:29 +01:00
MrHuangJser
230efb8168
fix lint issue
2020-01-13 09:45:52 +08:00
MrHuangJser
ebc7b5b0f5
rename useGlobalState to createGlobalState
2020-01-13 09:42:56 +08:00
Ayush Goyal
c3c9061dbc
update for prettier changes
2020-01-12 02:06:05 +05:30
Ayush Goyal
bc72bc13e7
Add useCookie hook
2020-01-12 02:00:24 +05:30
Arnaud de Surirey
9b31c42ccb
fix: useUpdateEffect cleanup test returns false positive
2020-01-07 19:34:57 +01:00
Arnaud de Surirey
0ce421ced7
fix: useUpdateEffect returns optional cleanup function
2020-01-07 19:08:38 +01:00
Anton Dosov
e1f4252a1a
improve shallow compare. test for array wil multiple deps
2019-12-27 13:53:14 +03:00
Anton Dosov
c4911e6d70
add use-shallow-compare-effect and use-custom-compare-effect
2019-12-27 13:04:39 +03:00
MrHuangJser
c85b85a299
MrHuangJser - add useGlobalState hook
2019-12-26 18:33:29 +08:00
Stefan Loeschcke
4f1d8c2cbd
fix(useSet): "has" method in useSet updated to reference latest set object
2019-12-10 09:48:00 +01:00
Vadim Dalecky
7cf955d6ed
Merge pull request #826 from stefanbugge/pr/816-fix-actions-not-stable-across-renders
...
fix(useMap): methods with side effects should be stable across renders.
2019-12-09 06:07:18 -08:00
Anton Zinovyev
125c7e96a1
feat: useScrollbarWidth hook; ( #825 )
...
* feat: useScrollbarWidth hook;
* chore: bump @xobotyi/scrollbar-width to 1.5.0 and add it to dependencies.
* fix: remove @xobotyi/scrollbar-width from dev-deps.
2019-12-09 15:47:44 +03:00
Stefan Loeschcke
020b4dbc6c
fix(useMap): methods with side effects should be stable across renders.
2019-12-09 11:11:14 +01:00
Vadim Dalecky
dbee45cc4c
test: add createBreakpoint tests
2019-12-08 02:36:21 -08:00
streamich
797e54c33b
test: 💍 add useUnmountPromise() tests
2019-12-08 00:46:40 +01:00
Stefan Loeschcke
044d2677aa
fix: "get" method in useMap updated to reference latest map object
2019-12-03 12:06:41 +01:00
Anton Zinovyev
0a66359143
feat: useStateHistory ( #709 )
...
* feat: add useStateHistory hook;
* fix: createBreakpoint lint fix (author skipped hooks);
2019-11-28 16:41:48 +03:00
hyunwoo.jo
29453eff70
change name
2019-11-26 18:02:41 +09:00
Jo Hyun Woo
db8776248c
Update createBreakpoin.test.ts
2019-11-26 17:10:21 +09:00
hyunwoo.jo
8028561e54
tslint
2019-11-25 22:12:15 +09:00
hyunwoo.jo
1da6e1808a
topo
2019-11-25 22:07:08 +09:00
hyunwoo.jo
3ea622078c
add: createbreakpoint test case
2019-11-25 22:03:27 +09:00
Anton Zinovyev
30abe2b22e
feat: add useFirstMountState & useRendersCount hooks ( #769 )
...
feat(useFirstMountState): hook to track if render is first;
feat(useRendersCount): hook to track renders count;
refactor(useUpdateEffect): now uses useFirstMountState hook;
refactor(usePreviousDistinct): now uses with useFirstMountState hook;
docs: update readme;
2019-11-23 15:14:35 +03:00
xobotyi
75284c62c8
fix( #792 ): make useUnmount invoke the current callback version instead of very first
2019-11-22 13:49:21 +03:00