react-typed-use-listener
TypeScript icon, indicating that this package has built-in type declarations

0.0.0 • Public • Published

react-typed-use-listener

How to use

import { useListener } from "react-typed-use-listener";

function App() {
  useListener({
    eventName: "resize",
    callback: (event) => {
      // NOTE: here event is typed as EventsMap['resize']
    },
  });

  return <></>;
}

export default App;

Readme

Keywords

none

Package Sidebar

Install

npm i react-typed-use-listener

Weekly Downloads

1

Version

0.0.0

License

ISC

Unpacked Size

8.13 kB

Total Files

15

Last publish

Collaborators

  • ibrahimshamma99