29 Commits

Author SHA1 Message Date
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
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
Vadim Dalecky
58c4fb1f38
Merge pull request #788 from dubzzz/pr/fix-useasyncfn-not-discarding-previous-calls
fix: useAsyncFn does not discard old promises and might produce races
2019-11-20 17:13:26 -08:00
Nicolas DUBIEN
022fa0b7b7 fix: useAsyncFn does not discard old promises and might produce races 2019-11-21 00:48:10 +01:00
Nicolas DUBIEN
53164864b7 Fix typing issues in useAsyncFn
The callback passed to useAsyncFn is supposed to be callable without any parameters too :/

According to its type definition
2019-11-21 00:14:08 +01:00
Nicolas DUBIEN
6fd2822496 TSX specs were ignored from yarn test 2019-11-20 23:50:50 +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
streamich
ad9a0bd313 test: 💍 enable hidden tests
Two test files did not have ".test" in their name, which would make Jest
to skip them.
2019-11-10 23:54:31 +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