734 Commits

Author SHA1 Message Date
Vadim Dalecky
fda7199b7d
feat: add createGlobalState hook generator 2020-02-03 16:20:07 -08:00
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
Vadim Dalecky
70fc33fce4
Merge pull request #830 from OBe95/fix/handle-undefined-mediaDevices
fix: handle undefined mediaDevices
2020-02-03 16:10:50 -08:00
streamich
0f119fe23e fix: 🐛 don't throw in useMediaDevices on missing browser API 2020-02-04 01:05:13 +01:00
streamich
68fb835ea6 fix: 🐛 better serialization handling in useLocalStorage hook 2020-02-04 00:38:56 +01:00
streamich
be69035caf feat: 🎸 catch up with v14 2020-02-03 23:35:28 +01:00
streamich
2e91e5396e chore: 🤖 catch up with master 2020-02-03 23:09:33 +01:00
Tyler Swavely
becdfff194 add serializer options back to useLocalStorage 2020-02-02 21:21:34 -08:00
Tyler Swavely
812d31afff Merge remote-tracking branch 'upstream/master' into fix-useLocalStorage 2020-02-01 16:42:25 -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
dizel3d
4f6d3887be fix(useIntersection): return null if IntersectionObserver is not supported 2020-01-28 00:26:08 +03:00
dizel3d
3f8687e1f5 fix(useIntersection): reset an intersectionObserverEntry when the ref changes 2020-01-28 00:25:57 +03:00
dizel3d
ac2f54a8f6 fix(useIntersection): disconnect an old IntersectionObserver instance when the ref changes 2020-01-27 23:57:36 +03:00
Kuss
57b904118e fix: Fail testing and update doc 2020-01-24 19:04:39 +08:00
Kuss
a0d61b5ea1 optional parameter and update test 2020-01-24 17:27:58 +08:00
Kuss
45681b88e3 feat: add useLongPress hook 2020-01-23 13:03:45 +08:00
Alexey Bojhev
83f4c466b0
Typings for useDefault
Added generic type for `useDefault` state
2020-01-18 21:20:05 +03:00
Mateusz Leonowicz
dc07e0e3b9 add setAll instead of overloading reset 2020-01-17 15:56:37 +00:00
Mateusz Leonowicz
7645f7249d feat: useMap: allow resetting with provided value other then initial 2020-01-17 15:03:35 +00:00
Vadim Dalecky
5d4785750d
Merge pull request #899 from cleverjam/useCopyToClipboard-tests
refactor: use copy to clipboard
2020-01-17 00:31:04 -08:00
streamich
3cf4f44d62 style: 💄 run Prettier 2020-01-17 09:25:26 +01:00
streamich
973a11fdb5 chore: 🤖 catch up with master 2020-01-17 09:24:06 +01:00
Jaime Liz
100b86898f refactor: refuse empty strings 2020-01-16 19:37:31 -06:00
Jaime Liz
86489d7f2b refactor: update use copy to clipboard 2020-01-16 18:58:14 -06:00
Ayush Goyal
65f3644205 feat: add useError hook 2020-01-16 21:13:35 +05:30
Ayush Goyal
d619c39a21 fix: check for null 2020-01-16 08:17:56 +05:30
Ayush Goyal
5316510bab feat: add serializer/deserializer option to useLocalStorage 2020-01-15 23:14:17 +05:30
Vadim Dalecky
d7784084fe
feat: add support for body lock on iOS 2020-01-15 03:13:11 -08:00
Vadim Dalecky
b8b3e479ce
feat: add option to useTitle to restore title on un-mount 2020-01-14 07:28:45 -08:00
zsh2401
8faa71f9ac useTitle could restore title optionally 2020-01-14 14:47:58 +08:00
Brendan Daoud
6d61c1d95a
Merge branch 'master' into pr/useStateContext 2020-01-13 18:08:09 +01:00
Brendan
bc74530f35 Add create reducer context 2020-01-13 14:01:21 +01:00
Brendan
e34ee0e66c Allow initial value override 2020-01-13 13:32:24 +01:00
Brendan
7285f7dc7a Add createStateContext 2020-01-13 13:09:29 +01:00
MrHuangJser
ebc7b5b0f5 rename useGlobalState to createGlobalState 2020-01-13 09:42:56 +08:00
Vadim Dalecky
6575b14985
feat: use useReducer in useUpdate hook, instead of useState + useCallback 2020-01-12 10:27:02 -08:00
Vadim Dalecky
477c1644a7
feat: Dependencies inference for useCustomCompareEffect 2020-01-12 10:22:59 -08:00
streamich
72658e42e9 chore: 🤖 catch-up with master 2020-01-12 18:27:51 +01:00
Vadim Dalecky
b9bd435258
Merge pull request #883 from streamich/useScratch
Use scratch
2020-01-12 09:26:42 -08:00
streamich
4ca2d9b29e test: 💍 add useScratch() stories 2020-01-12 18:17:56 +01:00
streamich
58db2f989d feat: 🎸 add useScratch() sensor hook 2020-01-12 18:04:37 +01:00
streamich
bf11131052 feat: 🎸 remove resize-observer-polyfill from useMeasure
BREAKING CHANGE: resize-observer-polyfill package is not used with useMeasure() hook
anymore.
2020-01-12 17:55:46 +01:00
streamich
2bbc73a5f0 feat: 🎸 mock useMeasure() hook on server and w/o ResizeObserver 2020-01-12 17:55:30 +01:00
streamich
4d8824064a feat: 🎸 improve implementation of useMeasure() hook
BREAKING CHANGE: useMeasure() now defaults all values to -1, if they were not set and
internal implementation heavily refactored.
2020-01-12 17:55:24 +01:00
Ayush Goyal
bc72bc13e7 Add useCookie hook 2020-01-12 02:00:24 +05:30
andrico
9f54379f33 remove ontouchstart event handler 2020-01-10 08:20:52 +00:00
andrico
c44bed806a prelimnary ios lock fixes 2020-01-10 08:11:22 +00:00
Alexey Bojhev
091c9077ad
upgrade useCustomCompareEffect.ts
Added generic useCustomCompareEffect for dependencies inference in compare function
2020-01-10 03:57:56 +03:00
Stefan
c4a14a4fb3 feat(useBeforeUnload): allow passing a dirty function (#842) 2020-01-08 13:43:01 +01:00
Arnaud de Surirey
0ce421ced7
fix: useUpdateEffect returns optional cleanup function 2020-01-07 19:08:38 +01:00