139 Commits

Author SHA1 Message Date
Matheus Albuquerque
e53a20fe5b feat(useKeyPress): allow complex bindings via key combos 2018-12-26 03:58:37 -03:00
Matheus Albuquerque
01df885b9d feat: 🎸 add useKeyPress hook 2018-12-26 02:49:06 -03:00
streamich
55673cb2e8 fix: 🐛 just use any for setTimeout because of diff environments 2018-12-20 00:02:05 +01:00
streamich
8c66abe9ca fix: 🐛 use Timeout type for build to work 2018-12-19 23:06:01 +01:00
streamich
244a533d33 fix: 🐛 memoized does not receive arguments 2018-12-19 23:04:18 +01:00
Va Da
2c884dc79f
Merge pull request #82 from Jivings/useDebounce
feat: added useDebounce hook
2018-12-19 17:09:37 +01:00
James Ivings
88dd513624 feat: pass arguments to memoized callback (#81) 2018-12-19 17:07:26 +01:00
James Ivings
91ff6ba376
feat: added useDebounce 2018-12-18 18:12:24 -05:00
streamich
0bb69df39c chore: 🤖 catch up with master 2018-12-17 18:42:18 +01:00
Va Da
047198d914
Merge pull request #71 from smmoosavi/group-story-book
chore(storybook): group stories with type
2018-12-17 18:40:11 +01:00
streamich
7c1b107eb4 feat: 🎸 list all useAsync state props so that TS dont complain 2018-12-17 18:37:14 +01:00
streamich
533e26f832 feat: 🎸 remove experimental hooks
BREAKING CHANGE: useRenderProp and useAsync are removed
2018-12-17 18:34:56 +01:00
ZHAO Jinxiang
966af4aaee feat: use discriminated union in useAsync 2018-12-17 21:12:38 +08:00
streamich
cdc5ec596d refactor: 💡 use import hooks from React proper 2018-12-16 11:02:52 +01:00
Joe Jiang
5d7434867c fix: synchronously re-render bug of useRaf hook (#77)
* Another animation frame will be requested before the cleanup function for `useEffect` is executed.
* Use `useLayoutEffect` to replace `useEffect`, in order to guarantee `cancelAnimationFrame` can work well.

More details can be found in issue https://github.com/streamich/react-use/issues/76
2018-12-16 10:45:06 +01:00
streamich
dfb0510775 feat: 🎸 add useRefMounted hook 2018-12-05 15:23:43 +01:00
streamich
f755001de2 chore: 🤖 upgrade React 2018-12-05 15:09:43 +01:00
Seyyed Morteza Moosavi
b67f65682c chore(storybook): group stories with type 2018-11-21 16:56:51 +03:30
Fatih Kadir Akın
124ef993d9 feat: bump useWait 2018-11-10 23:32:44 +01:00
Va Da
e62447189a
chore: fix useSessionStorage demo 2018-11-06 21:52:28 +01:00
Va Da
f4078e9b95
chore: enable useLocalStorage demo 2018-11-06 21:51:46 +01:00
Fatih Kadir Akın
61c6058b5d feat: add useWait hook 2018-11-06 21:49:47 +01:00
Andrew Joslin
eca432a921 feat: add useSessionStorage hook
* Add useSessionStorage

* chore: uncomment session storage docs story
2018-11-06 21:45:57 +01:00
Li Yan
bfd114a407 feat: allow useSetState setter to accept function
* make setState of useSetState accept function argument

* update storybook
2018-11-02 08:50:04 +01:00
Gabriel Basilio Brito
37de6d26f2 chore: remove unused import in useLocalStorage.ts 2018-10-31 22:36:51 +01:00
streamich
c2aee592af feat: 🎸 add useHoverDirty hook 2018-10-30 18:18:51 +01:00
streamich
73e05c7d59 docs: ✏️ add useLocalStorage docs 2018-10-30 17:56:04 +01:00
streamich
4de7819058 chore: 🤖 playing with useAdopt for stateful components 2018-10-30 17:44:58 +01:00
streamich
d2117225e4 feat: 🎸 implement useLocalStorage without events 2018-10-30 17:44:42 +01:00
streamich
91bee9a3c2 feat: 🎸 add useAdopt hook 2018-10-29 23:07:39 +01:00
streamich
2d85c61ba8 feat: 🎸 add useRenderProp hook 2018-10-29 22:45:09 +01:00
streamich
ead142c6fb feat: 🎸 add useCallbag hook 2018-10-29 22:07:54 +01:00
streamich
90d2c224f6 feat: 🎸 add useOutsideClick hook 2018-10-29 21:47:06 +01:00
streamich
05da37fc18 chore: 🤖 start work on useDropArea 2018-10-29 21:40:36 +01:00
streamich
8670c7480f feat: 🎸 allow to pass React <video> el in useVideo and useAudio 2018-10-29 21:21:55 +01:00
streamich
ff05419df1 feat: 🎸 add useVideo hook 2018-10-29 21:12:26 +01:00
streamich
8730eaa441 feat: 🎸 add createMemo hook factory 2018-10-29 20:50:08 +01:00
streamich
a58a4a7889 feat: 🎸 add useNumber alias 2018-10-29 18:44:25 +01:00
streamich
395e82b03b feat: 🎸 improve useCounter interface
BREAKING CHANGE: useCounter interface changed
2018-10-29 18:42:47 +01:00
streamich
3c1e57d60e perf: ️ wrape useGetSetState callbacks in useCallback 2018-10-29 17:46:28 +01:00
streamich
dcd1013736 feat: 🎸 add useGetSetState 2018-10-29 17:41:34 +01:00
streamich
869f767c9a feat: 🎸 accept any value type in useToggle and cast it to bool
BREAKING CHANGE: now useToggle and useBoolean accept any value type and cast it to
boolean.
2018-10-29 15:33:05 +01:00
streamich
ce6de24e2f feat: 🎸 add useBoolean hook 2018-10-29 15:27:51 +01:00
streamich
52abf315ca refactor: 💡 use useUpdate in useGetSet 2018-10-29 15:06:38 +01:00
streamich
c00f308e95 feat: 🎸 add useUpdate hook 2018-10-29 15:05:16 +01:00
streamich
bfc30b99ab feat: 🎸 add useGetSet hook 2018-10-29 14:57:56 +01:00
streamich
711e8315ac feat: 🎸 add useObservable 2018-10-28 23:22:46 +01:00
Pavel Ivanoff
5a6da18e8a feat: 🎸 change API for useToggle hook (#16)
It's better option to decrease useToggle params destruction and keep flexibility

BREAKING CHANGE: useToggle interface changed
2018-10-28 22:24:48 +01:00
streamich
5728cc958c docs: ✏️ add docs to Storybook demos 2018-10-28 15:11:43 +01:00
streamich
2cdb09e865 docs: ✏️ improve useSpeech docs 2018-10-28 11:28:56 +01:00