react-typed-use-listener
v0.0.0
Published
## How to use
Downloads
2
Readme
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;