@preact-hooks/event
v1.0.7
Published
A custom Preact Hook that provides a declarative useEventListener.
Downloads
13
Maintainers
Readme
Inspired by donovan/use-event-listener
Table of Contents
Installation
This package has Preact 10+ as a peer dependency.
npm install @preact-hooks/event
or yarn add @preact-hooks/event
You can also load it via the unpkg CDN
https://unpkg.com/@preact-hooks/event
will download the latest UMD bundle.
Docs
For usage and examples see donovan/use-event-listener.