Tyler Swavely
ead2242875
reintroduce types
2019-11-19 23:04:34 -08:00
Tyler Swavely
126c509139
reject nullish keys
2019-11-19 22:46:35 -08:00
Tyler Swavely
da4bfddb26
finish tests and hook
2019-11-19 22:24:59 -08:00
Vinit
1811908bd6
fix spelling in useQueue doc and story
2019-11-18 21:47:09 +01:00
Vadim Dalecky
0073acb538
Merge pull request #773 from streamich/fet-improve-useStateValidity
...
feat: Improve useStateValidator & useMultiStateValidator typings
2019-11-14 22:46:45 +01:00
xobotyi
436c210f7b
feat(useStateValidator): Refactor method and improve typings;
...
feat(useMultiStateValidator): Refactor method and improve typings;
2019-11-14 14:40:01 +03:00
Daniel
095b4de232
feat: Add useSet hook
2019-11-14 12:26:24 +02:00
xobotyi
399baf6472
Fix formatting issues occurring with newest prettier version;
2019-11-13 02:17:10 +03:00
Brendan
61e29cd249
Proper typing for return value
2019-11-11 20:18:40 +01:00
Brendan
4e1108f392
Proper typing for nextArgs
2019-11-11 20:16:39 +01:00
Brendan
61f21d4400
Remove redundant ref
2019-11-11 20:14:40 +01:00
Vadim Dalecky
61a83d124d
fix: restrict useThrottleFn types
2019-11-11 03:09:55 +01:00
Vadim Dalecky
1b72a53864
Merge pull request #763 from streamich/fix-use-location-in-ie
...
fix: 🐛 check window.Event constructor exists in useLocation
2019-11-10 20:47:57 +01:00
Yingtao Su
e65338372a
feat(useCounter): reset to the newest initialValue ( #667 )
2019-11-10 20:05:34 +01:00
streamich
ad09431145
fix: 🐛 check window.Event constructor exists in useLocation
...
IE does not have window.Event constructor.
2019-11-10 20:03:41 +01:00
Anton Zinovyev
8de2a3ee13
chore: move tests to top level /tests folder
...
chore: move all the tests to the separate directory outside of sources;
chore: remove jest.config.js (config moved to the package.json);
test: unused import in test;
test: 💍 fix tests add back x and y to useMeasure
chore: 🤖 add linter to /tests folder
ci: 🎡 limit Jest worker count for CircleCI
2019-11-08 16:55:34 -05:00
Vadim Dalecky
32b9eb8a2f
Merge pull request #753 from streamich/rework-useList
...
feat(useList): reimplemented useList hook;
2019-11-08 16:00:17 -05:00
xobotyi
43cb6aa612
feat(useStateList): implemented currentIndex, setState, setStateAt methods as requested in #634 ;
...
Reworked a bit implementation of `next` and `prev` to make it reuse the `setStateAt` method;
2019-11-07 12:03:34 +03:00
xobotyi
53787c01c5
Merge branch 'feat/enhance_useDebounce' of https://github.com/brickspert/react-use into brickspert-feat/enhance_useDebounce
...
# Conflicts:
# src/__tests__/useTimeoutFn.test.ts
# src/useDebounce.ts
2019-11-07 00:40:41 +03:00
Anton Zinovyev
1fdc9076dc
Merge pull request #673 from streamich/useVibrate
...
useVibrate
2019-11-06 23:57:54 +03:00
Anton Zinovyev
ecaa6a91c8
Merge branch 'master' into feature/use-queue
2019-11-06 23:04:51 +03:00
xobotyi
5a49f844b9
Final fix of #749
2019-11-06 22:54:18 +03:00
Anton Zinovyev
2081b184d0
Merge pull request #754 from streamich/fix-749
...
fix(#749 ): now should work with SSR
2019-11-06 16:01:33 +03:00
xobotyi
c12976cad2
fix( #749 ): now should work with SSR
2019-11-06 15:15:50 +03:00
xobotyi
59aa41cff4
fix(resolveHookState): by accident removed needed type.
2019-11-06 15:09:07 +03:00
xobotyi
1840b577e2
feat(useList): reimplemented useList hook;
...
feat(useList): new action upsert;
feat(useList): new action update;
feat(useList): new action updateFirst;
feat(useList): new action insertAt;
feat(useList): action remove renamed to removeAt (ref remained);
feat(useUpsert): useUpsert hook deprecated cause of duplicate functionality and bad naming;
2019-11-06 14:49:33 +03:00
Vadim Dalecky
7154ca8d71
Merge pull request #595 from macinjoke/useEvent-type-inference
...
improve useEvent type
2019-11-05 23:21:13 -05:00
Anton Zinovyev
588f2de637
Merge pull request #738 from streamich/fix-useStateList
...
fix(useStateList): rework the hook
2019-11-04 12:15:17 +03:00
Anton Zinovyev
198d84a5ae
Merge pull request #739 from streamich/fix-usePreviousDistinct
...
feat(usePreviousDistinct): fix tests and improve the hook
2019-11-04 12:15:02 +03:00
xobotyi
d48e03e9ee
feat: re-create yarn.lock
2019-11-04 12:13:26 +03:00
xobotyi
a13326779f
feat(useTitle): reworked hook to make it synchronous without useUpdate;
2019-11-04 11:54:12 +03:00
xobotyi
cb373f951f
feat(usePreviousDistinct): add tests for undefined value behaviour;
2019-11-04 11:10:37 +03:00
xobotyi
fbe9b1303c
feat(usePreviousDistinct): now predicate not called on initial render;
...
feat(usePreviousDistinct): tests are fine now;
2019-11-04 10:47:53 +03:00
xobotyi
30f53e8c5d
feat(usePreviousDistinct): improve types;
2019-11-04 10:05:08 +03:00
xobotyi
242c274dd4
feat(useStateList): rework useStateList to make it work properly.
2019-11-04 09:36:36 +03:00
xobotyi
03bdecf7ac
feat(useWindowSize): A bit changed lyfecycle and added types;
...
feat(useWindowSize): Rewritten tests - covers more cases and will work on next @testing-library/react-hooks release (been broken before);
2019-11-03 23:13:36 +03:00
xobotyi
26baf47bac
fix(useLockBodyScroll): infer overflow type directly from declaration.
2019-11-02 01:24:06 +03:00
Vadim Dalecky
8d40f1800d
Merge pull request #711 from streamich/remove-react-wait
...
BREAKING CHANGE: useWait hook has been removed from react-use
2019-11-01 22:30:04 +01:00
xobotyi
d7c38bd77f
feat(useWait): removed from package due to it is simple reexport of other package;
2019-11-01 00:20:25 +03:00
xobotyi
dc364c851c
feat(useRefMounted): remove obsolete hook;
2019-11-01 00:13:57 +03:00
Vadim Dalecky
b8b49b3a60
Merge pull request #723 from streamich/resolveHookState-implementation
...
feat: react-like state resolver
2019-10-31 22:01:35 +01:00
Vadim Dalecky
f1cf036351
feat: add typings for createReducer
2019-10-31 20:58:39 +01:00
Anton Zinovyev
6807452014
Merge pull request #720 from streamich/useWait-deprecation
...
feat(useWait): add deprecation messages to readme and export;
2019-10-31 11:13:27 +03:00
xobotyi
befcf84c2c
feat(useCounter): reworked with use of new resolveHookState function plus improved memory usage;
...
feat(resolveHookState): improved types;
2019-10-31 04:48:30 +03:00
xobotyi
9b5d0f2ad1
feat(useGetSet): reworked with use of new resolveHookState function plus improved memory usage;
2019-10-31 02:58:48 +03:00
xobotyi
9fd02eb821
feat: react-like state resolver to use it in stateful hooks;
2019-10-31 02:56:41 +03:00
xobotyi
0f02fd093a
feat(useUpdate): improve memory usage - now single function instance to increment all counters;
2019-10-30 15:36:02 +03:00
xobotyi
d33824578c
feat(useWait): add deprecation messages to readme and export;
2019-10-30 10:00:20 +03:00
Vadim Dalecky
c23e105bcb
Merge pull request #665 from qianL93/patch-1
...
fix: useSize avoid crash in Safari 11
2019-10-28 14:08:31 +01:00
streamich
456d15827d
style: 💄 apply yarn lint:fix
2019-10-26 10:54:32 +02:00