Anton Zinovyev
Anton Zinovyev
@Rey-Wang working on it right now, will be published Monday I guess
`useBeforeUnload` is easily achievable with `useEventListener` hook ```ts useEventListener(window, 'beforeunload', ()=>{ /* do your stuff here */ }) ```
surely do, just realized just now (list been made up before `useEventListener` implementation)
Overall you can make a PR with migration guide for taht hook (have not enough time for that atm)
I'll mention it in the list later
@ArttuOll could you please make a mention to migration guide about unwilling to implement `useBeforeUnload` with example from above conversation?
:tada: This issue has been resolved in version 12.0.3 :tada: The release is available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/@react-hookz/web/v/12.0.3) - [GitHub release](https://github.com/react-hookz/web/releases/tag/v12.0.3) Your **[semantic-release](https://github.com/semantic-release/semantic-release)** bot :package::rocket:
Well, nope, didnt worked out. Ill dig more later.
:tada: This issue has been resolved in version 17.0.0 :tada: The release is available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/@react-hookz/web/v/17.0.0) - [GitHub release](https://github.com/react-hookz/web/releases/tag/v17.0.0) Your **[semantic-release](https://github.com/semantic-release/semantic-release)** bot :package::rocket:
It is described in hook docs, that it is not exported from the index file, because of optional dependency. Since otherwise we'd have to add js-cookie as non-optional dependency and...