220 Commits

Author SHA1 Message Date
Va Da
2b3daef87a
docs: use mdash instead of hyphen 2018-12-26 12:44:55 +01:00
Matheus Albuquerque
7f163285d9 docs(README): add useKeyPress to the list 2018-12-26 04:27:36 -03:00
Matheus Albuquerque
6a1933b8ed docs(useKeyPress): update samples and docs on how to use key combos 2018-12-26 04:04:08 -03:00
Matheus Albuquerque
e53a20fe5b feat(useKeyPress): allow complex bindings via key combos 2018-12-26 03:58:37 -03:00
Matheus Albuquerque
6ffebb69fd chore(package): add keyboardjs as a dep 2018-12-26 03:56:39 -03:00
Matheus Albuquerque
01df885b9d feat: 🎸 add useKeyPress hook 2018-12-26 02:49:06 -03:00
semantic-release-bot
752e92a0f2 chore(release): 5.1.1 [skip ci]
## [5.1.1](https://github.com/streamich/react-use/compare/v5.1.0...v5.1.1) (2018-12-20)

### Bug Fixes

* lock react and react-dom to a fixed version ([#83](https://github.com/streamich/react-use/issues/83)) ([455812d](https://github.com/streamich/react-use/commit/455812d))
v5.1.1
2018-12-20 08:56:05 +00:00
Joe Jiang
455812d33a fix: lock react and react-dom to a fixed version (#83)
According to React Blog, the newest version of React v16.7 doesn't include React Hooks, before they tag an extra version for upcoming hooks, we should lock the version to latest react 16.7.0 alpha version, rather than use `next` to specify its version info in `package.json`. More details can be found at https://reactjs.org/blog/2018/12/19/react-v-16-7.html#can-i-use-hooks-yet
2018-12-20 09:54:40 +01:00
semantic-release-bot
d8800b4b42 chore(release): 5.1.0 [skip ci]
# [5.1.0](https://github.com/streamich/react-use/compare/v5.0.0...v5.1.0) (2018-12-19)

### Bug Fixes

* 🐛 just use any for setTimeout because of diff environments ([55673cb](https://github.com/streamich/react-use/commit/55673cb))
* 🐛 memoized does not receive arguments ([244a533](https://github.com/streamich/react-use/commit/244a533))
* 🐛 use Timeout type for build to work ([8c66abe](https://github.com/streamich/react-use/commit/8c66abe))

### Features

* added useDebounce ([91ff6ba](https://github.com/streamich/react-use/commit/91ff6ba))
* pass arguments to memoized callback ([#81](https://github.com/streamich/react-use/issues/81)) ([88dd513](https://github.com/streamich/react-use/commit/88dd513))
v5.1.0
2018-12-19 23:03:38 +00: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
fdcd92dec3
docs: make useDebounce description one line 2018-12-19 17:10:52 +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
a082d59e13
chore: updated readme 2018-12-18 23:00:02 -05:00
James Ivings
91ff6ba376
feat: added useDebounce 2018-12-18 18:12:24 -05:00
semantic-release-bot
3c9a48e1ed chore(release): 5.0.0 [skip ci]
# [5.0.0](https://github.com/streamich/react-use/compare/v4.11.1...v5.0.0) (2018-12-17)

### Features

* 🎸 list all useAsync state props so that TS dont complain ([7c1b107](https://github.com/streamich/react-use/commit/7c1b107))
* 🎸 remove experimental hooks ([533e26f](https://github.com/streamich/react-use/commit/533e26f))
* use discriminated union in useAsync ([966af4a](https://github.com/streamich/react-use/commit/966af4a))

### BREAKING CHANGES

* useRenderProp and useAsync are removed
v5.0.0
2018-12-17 17:47:47 +00:00
Va Da
fb58e38642
Merge pull request #80 from streamich/cleanup
Cleanup
2018-12-17 18:46:30 +01: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
Va Da
d9d23fd3a6
Merge pull request #79 from xiaoxiangmoe/master
feat: use discriminated union in useAsync
2018-12-17 15:00:24 +01:00
ZHAO Jinxiang
966af4aaee feat: use discriminated union in useAsync 2018-12-17 21:12:38 +08:00
semantic-release-bot
8d3dbd417f chore(release): 4.11.1 [skip ci]
## [4.11.1](https://github.com/streamich/react-use/compare/v4.11.0...v4.11.1) (2018-12-16)

### Bug Fixes

* synchronously re-render bug of useRaf hook ([#77](https://github.com/streamich/react-use/issues/77)) ([5d74348](https://github.com/streamich/react-use/commit/5d74348))
v4.11.1
2018-12-16 10:07:11 +00:00
Va Da
c2855955c9
Merge pull request #78 from streamich/fix-imports
refactor: 💡 use import hooks from React proper
2018-12-16 11:05:50 +01: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
Va Da
30cee86c39
docs: add note about the polyfill 2018-12-05 22:05:30 +01:00
semantic-release-bot
6b585f01b9 chore(release): 4.11.0 [skip ci]
# [4.11.0](https://github.com/streamich/react-use/compare/v4.10.0...v4.11.0) (2018-12-05)

### Features

* 🎸 add useRefMounted hook ([dfb0510](https://github.com/streamich/react-use/commit/dfb0510))
v4.11.0
2018-12-05 14:33:12 +00:00
Va Da
3c050f76ed
Merge pull request #72 from streamich/useRefMounted
Use ref mounted
2018-12-05 15:31:48 +01:00
streamich
3b135d9d1d chore: 🤖 remove react-dom typings 2018-12-05 15:29:15 +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
semantic-release-bot
6c4bcfd22a chore(release): 4.10.0 [skip ci]
# [4.10.0](https://github.com/streamich/react-use/compare/v4.9.0...v4.10.0) (2018-11-10)

### Features

* bump useWait ([124ef99](https://github.com/streamich/react-use/commit/124ef99))
v4.10.0
2018-11-10 22:34:42 +00:00
Fatih Kadir Akın
124ef993d9 feat: bump useWait 2018-11-10 23:32:44 +01:00
semantic-release-bot
6f86b9e4e1 chore(release): 4.9.0 [skip ci]
# [4.9.0](https://github.com/streamich/react-use/compare/v4.8.0...v4.9.0) (2018-11-06)

### Features

* add useSessionStorage hook ([eca432a](https://github.com/streamich/react-use/commit/eca432a))
* add useWait hook ([61c6058](https://github.com/streamich/react-use/commit/61c6058))
v4.9.0
2018-11-06 20:53:46 +00: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
Va Da
58532f73e7
docs: remove ref from useAudio reference 2018-11-04 12:47:16 +01:00
Va Da
452e13ef82
docs: improve useSetState reference 2018-11-03 08:47:40 +01:00
semantic-release-bot
a539c7da7a chore(release): 4.8.0 [skip ci]
# [4.8.0](https://github.com/streamich/react-use/compare/v4.7.0...v4.8.0) (2018-11-02)

### Features

* allow useSetState setter to accept function ([bfd114a](https://github.com/streamich/react-use/commit/bfd114a))
v4.8.0
2018-11-02 07:51:15 +00: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
Truong Hoang Dung
819bd5455a docs: fix typo on useLocalStorage's raw 2018-11-02 07:45:10 +01:00
Gabriel Basilio Brito
37de6d26f2 chore: remove unused import in useLocalStorage.ts 2018-10-31 22:36:51 +01:00
0xflotus
ca5abe5dcd fixed requestAnimationFrame 2018-10-31 20:12:30 +01:00