13 Commits

Author SHA1 Message Date
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
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