434 Commits

Author SHA1 Message Date
semantic-release-bot
f6fcf6582a chore(release): 6.2.2 [skip ci]
## [6.2.2](https://github.com/streamich/react-use/compare/v6.2.1...v6.2.2) (2019-03-28)

### Bug Fixes

* fix deps arg and union type in useAsync and useAsyncRetry ([929e726](https://github.com/streamich/react-use/commit/929e726))
v6.2.2
2019-03-28 15:01:36 +00:00
Va Da
41fdcabd09
Merge pull request #186 from xiaoxiangmoe/master
fix: fix deps arg and union type in useAsync and useAsyncRetry
2019-03-28 16:00:09 +01:00
ZHAO Jinxiang
929e72679b fix: fix deps arg and union type in useAsync and useAsyncRetry 2019-03-28 22:32:35 +08:00
Va Da
0a53a5651c
Merge pull request #182 from streamich/useThrottle-fix
fix: useThrottle discard intermediary calls
2019-03-27 23:07:23 +01:00
Ward Oosterlijnck
4fda5bba7d discard intermediary calls 2019-03-28 08:30:27 +11:00
Renovate Bot
2fce39c98c chore(deps): update dependency fork-ts-checker-webpack-plugin to v1.0.1 2019-03-27 20:40:06 +00:00
Renovate Bot
b8875a2f9e chore(deps): update dependency @types/react to v16.8.10 2019-03-27 17:25:14 +00:00
semantic-release-bot
8dac4e8f94 chore(release): 6.2.1 [skip ci]
## [6.2.1](https://github.com/streamich/react-use/compare/v6.2.0...v6.2.1) (2019-03-27)

### Bug Fixes

* set 'module' field properly ([35d4fc2](https://github.com/streamich/react-use/commit/35d4fc2))
v6.2.1
2019-03-27 11:58:36 +00:00
Va Da
c7fe040ff9
Merge pull request #179 from liuyuchenzh/master
fix: set 'module' field properly
2019-03-27 12:57:21 +01:00
Yuchen Liu
35d4fc2fc2 fix: set 'module' field properly 2019-03-27 19:54:22 +08:00
semantic-release-bot
c52f35dc78 chore(release): 6.2.0 [skip ci]
# [6.2.0](https://github.com/streamich/react-use/compare/v6.1.0...v6.2.0) (2019-03-27)

### Bug Fixes

* add esm to 'files' in package.json ([fc1ba07](https://github.com/streamich/react-use/commit/fc1ba07))
* clean esm folder as well ([0a10a6e](https://github.com/streamich/react-use/commit/0a10a6e))

### Features

* emit code in ES Module mode ([464642e](https://github.com/streamich/react-use/commit/464642e))
v6.2.0
2019-03-27 09:57:42 +00:00
Va Da
85205c1125
Merge pull request #178 from liuyuchenzh/master
feat: emit code in ES Module format
2019-03-27 10:56:12 +01:00
Yuchen Liu
fc1ba0746e fix: add esm to 'files' in package.json 2019-03-27 17:55:22 +08:00
Yuchen Liu
0a10a6ecfd fix: clean esm folder as well 2019-03-27 17:53:45 +08:00
Yuchen Liu
052d82f510 refactor: export ES Module to esm folder 2019-03-27 17:51:34 +08:00
Yuchen Liu
464642ee3a feat: emit code in ES Module mode 2019-03-27 16:43:52 +08:00
Renovate Bot
27cadf94db chore(deps): update dependency @types/react to v16.8.8 2019-03-26 13:07:16 +00:00
Renovate Bot
6627aaa0ca chore(deps): pin dependencies 2019-03-26 12:51:23 +00:00
semantic-release-bot
592b61a128 chore(release): 6.1.0 [skip ci]
# [6.1.0](https://github.com/streamich/react-use/compare/v6.0.0...v6.1.0) (2019-03-26)

### Features

* add useThrottle hook ([756bc99](https://github.com/streamich/react-use/commit/756bc99))
v6.1.0
2019-03-26 10:50:40 +00:00
Va Da
756bc992d4
feat: add useThrottle hook 2019-03-26 11:49:13 +01:00
Va Da
c9d7b5210a
Merge branch 'master' into useThrottle 2019-03-26 11:48:58 +01:00
Ward Oosterlijnck
c51eb7fe6a args optional 2019-03-26 21:43:27 +11:00
Va Da
931220239e
docs: fix typo in useMouse [skip ci] 2019-03-26 11:31:17 +01:00
semantic-release-bot
6537a21249 chore(release): 6.0.0 [skip ci]
# [6.0.0](https://github.com/streamich/react-use/compare/v5.16.1...v6.0.0) (2019-03-26)

### Bug Fixes

* 🐛 bump nano-css ([f1f36dc](https://github.com/streamich/react-use/commit/f1f36dc)), closes [#90](https://github.com/streamich/react-use/issues/90)
* 🐛 don't throw only in development ([f5faba5](https://github.com/streamich/react-use/commit/f5faba5))

### chore

* 🤖 don't install only large dependencies ([6170067](https://github.com/streamich/react-use/commit/6170067))

### Features

* 🎸 add {bound} option to useMouse ([9bb02a1](https://github.com/streamich/react-use/commit/9bb02a1))
* 🎸 implement useClickAway, remove useOutsideClick ([a03143a](https://github.com/streamich/react-use/commit/a03143a))
* 🎸 keep global state of all useLockBodyScroll hooks ([5dd10e9](https://github.com/streamich/react-use/commit/5dd10e9))
* 🎸 move extra mouse functionality into useMouseHovered ([8b0580e](https://github.com/streamich/react-use/commit/8b0580e))
* more precise size for useMouse ([b887075](https://github.com/streamich/react-use/commit/b887075))

### BREAKING CHANGES

* 🧨 error is logged instead of thrown in development environment
* 🧨 useOutsideClick is now useClickAway
* 🧨 useCallbag hook is removed, some hooks KeyboardJS and Rebound installed
separately
v6.0.0
2019-03-26 10:28:16 +00:00
Va Da
821320c8a9
release v6 2019-03-26 11:26:57 +01:00
Va Da
8060688cde
Merge branch 'master' into v6 2019-03-26 11:24:51 +01:00
streamich
b5c7aecfa6 docs: ✏️ add useMouseHovered docs 2019-03-26 11:20:42 +01:00
streamich
8b0580e98b feat: 🎸 move extra mouse functionality into useMouseHovered 2019-03-26 11:20:42 +01:00
streamich
9bb02a1b93 feat: 🎸 add {bound} option to useMouse 2019-03-26 11:20:42 +01:00
streamich
f5faba515d fix: 🐛 don't throw only in development
Throwing changes behaviour of the code, other code may rely on this
behaviour, so we either throw in all environments or console.error
instead.

BREAKING CHANGE: 🧨 error is logged instead of thrown in development environment
2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
2b3dd239cb Make useHoverDirty controllable + reuse in useMouse 2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
28b5bc97d4 useMouse whenHovered option 2019-03-26 11:20:42 +01:00
semantic-release-bot
f9c6dd9d94 chore(release): 5.16.0 [skip ci]
# [5.16.0](https://github.com/streamich/react-use/compare/v5.15.0...v5.16.0) (2019-03-25)

### Features

* more precise size for useMouse ([1761031](https://github.com/streamich/react-use/commit/1761031))
2019-03-26 11:20:42 +01:00
ShizukuIchi
b88707554f feat: more precise size for useMouse 2019-03-26 11:20:42 +01:00
Va Da
ec30e92283 docs: fix typo [skip ci] 2019-03-26 11:20:42 +01:00
semantic-release-bot
6051bc17d5 chore(release): 5.15.0 [skip ci]
# [5.15.0](https://github.com/streamich/react-use/compare/v5.14.0...v5.15.0) (2019-03-25)

### Features

* add useMouse hook ([17dfa8e](https://github.com/streamich/react-use/commit/17dfa8e))
2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
8bf149794b useScroll cancel animation frame in handler 2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
2fd1d673e0 remove event listener + cancel animation frame in handler 2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
e8b43ea95c useMouse hook 2019-03-26 11:20:42 +01:00
Renovate Bot
74cbb1eaca chore(deps): update storybook monorepo to v5.0.5 2019-03-26 11:20:42 +01:00
semantic-release-bot
c10bc5d946 chore(release): 5.14.0 [skip ci]
# [5.14.0](https://github.com/streamich/react-use/compare/v5.13.0...v5.14.0) (2019-03-24)

### Features

* 🎸 keep global state of all useLockBodyScroll hooks ([9bb7047](https://github.com/streamich/react-use/commit/9bb7047))
* add useLockBodyScroll hook ([d990db4](https://github.com/streamich/react-use/commit/d990db4))
2019-03-26 11:20:42 +01:00
streamich
5dd10e91ee feat: 🎸 keep global state of all useLockBodyScroll hooks
This change will keep document body locked as long as at least one hook
is enabled on the page. Maybe it makes sense to generalize this logic
for other side-effect hooks. One such hook could be useBlurBody that
blurs page - useful for modals and overlays.
2019-03-26 11:20:42 +01:00
Renovate Bot
30ee224bce chore(deps): update storybook monorepo to v5.0.4 2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
f814fd216b Added useLockBodyScroll to README 2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
5740a53f35 useLockBodyScroll 2019-03-26 11:20:42 +01:00
Ward Oosterlijnck
7a6b7a249f docs: typo in README 2019-03-26 11:20:42 +01:00
streamich
f1f36dc4b1 fix: 🐛 bump nano-css
 Closes: #90
2019-03-26 10:23:26 +01:00
Ward Oosterlijnck
a4f0197161 Add debounced value to demo and docs 2019-03-26 20:08:35 +11:00
Ward Oosterlijnck
6d3641e04c Added to README + typo fix 2019-03-26 20:01:03 +11:00
Ward Oosterlijnck
e6f179d682 useThrottle 2019-03-26 20:00:37 +11:00