25 Commits

Author SHA1 Message Date
Alexander Kachkaev
d2028ae44c
Run "yarn lint --fix" 2021-08-31 22:22:38 +01:00
SkutinAnton
e5fb4e9601
Merge branch 'master' into fix-useAsyncFn 2021-08-25 11:22:38 +03:00
SkutinAnton
11144764c7 - fixed loading if we have initialState with loading: true 2021-08-25 11:06:59 +03:00
xobotyi
b6993a6f95
feat(prettier): make prettier a part of eslint.
Also reduce max line width to 100. And remove `lint:types` step for
commit sequence, it bothers when committing incomplete (wip) changes.
2021-02-01 18:58:55 +03:00
Renovate Bot
a27f09fd36
chore: refactoring and rearrangement.
More DRY code. Also move non-hooks to separate directories.

BREAKING CHANGE: all `create*` factories been moved to `factory` subdirectory and in case direct import should be imported like `react-use/esm/factory/createBreakpoint`
BREAKING CHANGE: `comps` directory renamed to `component`
2021-01-30 23:30:26 +03:00
ddaza
3ce080cdf3 updated prettier and eslint 2020-07-02 14:19:03 -05:00
streamich
c75a0a6ef3 chore: 🤖 catch up with master 2020-02-15 11:20:01 +01:00
Ayush Goyal
67d65833d9 chore: disable eslint for affected files 2020-02-04 07:12:19 +05:30
Vadim Dalecky
54ac91b28d
feat: keep previous state in useAsyncFn
BREAKING CHANGE: useAsyncFn now keeps hold of old result/error when called multiple times
2020-02-03 16:12:50 -08:00
carlos
062e60663d Resolve #934: useAsyncFn: keeping the previous state when start running the async function 2020-01-30 18:03:54 +08:00
streamich
074d8ce16d chore: 🤖 catch-up with master 2019-12-31 00:02:24 +01:00
Nicolas DUBIEN
022fa0b7b7 fix: useAsyncFn does not discard old promises and might produce races 2019-11-21 00:48:10 +01:00
xobotyi
563f71db14 Fix Promise type detection;
Fix function name;
2019-09-04 14:03:26 +03:00
xobotyi
641a879a51 useAsyncFn and useAsync typings made great again =)
Now it uses fully generic arguments and returning types, thus no problems with inferring callback call arguments;
2019-09-04 11:29:26 +03:00
xobotyi
58a816c4f8 Replaced all useRefMounted to useMountedState to deprecate first one in later releases; 2019-08-14 03:46:03 +03:00
NullVoxPopuli
ed17aed4bd make types better 2019-05-31 13:04:25 -04:00
NullVoxPopuli
facedc10aa simplify types 2019-05-30 13:41:12 -04:00
NullVoxPopuli
30209518d5 finished 2019-05-29 14:11:42 -04:00
NullVoxPopuli
cabb9d6676 tests pass, now to fix types 2019-05-29 13:04:11 -04:00
NullVoxPopuli
3f9cc47975 add some tests 2019-05-29 10:08:12 -04:00
NullVoxPopuli
ab418cc6ec add tests, and fix the initial state issue 2019-05-28 17:30:59 -04:00
Maxim Malov
c6d692a6dc
Pass arguments to useAsyncFn fetcher 2019-05-20 17:40:29 +06:00
Ankith Konda
379e4577c9 add lint-staged for lint fix add check ts 2019-04-13 12:30:56 +10:00
Ankith Konda
f02b92d423 Add TSLint + Prettier and fix lint issues 2019-04-12 23:18:11 +10:00
Ward Oosterlijnck
914fccfffc Rename useAsyncCallback to useAsyncFn 2019-04-09 08:48:14 +10:00