758 Commits

Author SHA1 Message Date
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
streamich
90ba9d000f fix: 🐛 remove set dependencies in useSet hook 2020-01-05 10:07:19 +01:00
Vadim Dalecky
8a6ece10da
Merge pull request #835 from suyingtao/master
feat(useLocalStorage): add remove method. (#229)
2020-01-05 00:53:00 -08:00
streamich
777865c3ac feat: 🎸 add [vertical] flag to useSlider() hook 2020-01-03 19:53:12 +01:00
streamich
1980d46199 refactor: 💡 don't use useMeassure in useSlider hook 2020-01-03 19:46:16 +01:00
streamich
1e379e4966 chore: 🤖 catch up with master 2020-01-03 19:38:07 +01:00
Filipe Froes
4ffe4542ae fix: generic type on event arg in onClickAway callback on useClickAway 2020-01-03 18:34:31 +02:00
Vadim Dalecky
52fbbfd7a6
Merge pull request #809 from streamich/fix-useSet-stale-closure
fix: use latest set object in useSet "has" method
2020-01-03 02:06:22 -08:00
streamich
074d8ce16d chore: 🤖 catch-up with master 2019-12-31 00:02:24 +01:00
streamich
d2c74f2763 chore: 🤖 resolve conflicts 2019-12-27 12:36:05 +01:00
streamich
8662dd0615 chore: 🤖 add new hooks to README, and minor tweaks to warnings 2019-12-27 12:33:08 +01:00
Anton Dosov
4f35605423 add useShallowCompareEffect and useCustomCompareEffect 2019-12-27 14:31:52 +03: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
MrHuangJser
c85b85a299 MrHuangJser - add useGlobalState hook 2019-12-26 18:33:29 +08:00
suyingtao
1620e019ff fix(useLocalStorage): using undefined for empty value instead of null 2019-12-16 12:59:03 +08:00
MHA15
baab9df948
fix ts definition to get no argument for dispatch function 2019-12-15 18:30:41 +03:30
MHA15
036d1c2f1f
fix import problems 2019-12-15 18:16:55 +03:30
MHA15
cb0ed5f758
change useUpdate hook to use reducer instead of state + callback
if we using reducer instead of useState then we don't need a useCallback and it's performance will increase
2019-12-15 12:44:51 +03:30
0BE
2cf2ab00eb Review feedback: avoid swallowing errors 2019-12-14 16:19:38 +01:00
suyingtao
587de16ef5 feat(useLocalStorage): add remove feature. (#229) 2019-12-13 18:45:39 +08:00
0BE
6f68437359 fix: handle undefined mediaDevices 2019-12-12 00:42:38 +01:00
Vadim Dalecky
208b869f97
Merge pull request #827 from stefanbugge/pr/808-fix-useset-outdated-closure
fix(useSet): "has" method in useSet updated to reference latest set object
2019-12-10 02:45:55 -08:00
Stefan Loeschcke
4f1d8c2cbd fix(useSet): "has" method in useSet updated to reference latest set object 2019-12-10 09:48:00 +01:00
Anton Zinovyev
2832b7a37e
chore: move all stories from src directory. (#715)
chore: clean tsconfig.json;

feat: updated webpack config to export a function to achieve full-control mode, instead of deprecated Extend Mode;
2019-12-09 23:36:40 +03: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