Package Exports
- @rooks/use-document-event-listener
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rooks/use-document-event-listener) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@rooks/use-document-event-listener
About
A react hook to an event listener to the document object
Installation
npm install --save @rooks/use-document-event-listener
Importing the hook
import useDocumentEventListener from "@rooks/use-document-event-listener"
Usage
function Demo() {
useDocumentEventListener("click", function(){
console.log("clicked")
});
return null
}
render(<Demo/>)