yarn add @junipero/hooks
import { useEventListener, useTimeout } from '@junipero/hooks';
export default () => {
useTimeout(() => {
console.log('This has been executed 1s after first render!');
}, 1000);
useEventListener('click', () => {
console.log('You clicked inside the current document');
});
return <div />;
};
https://junipero.design/components/use-event-listener
Please check the CONTRIBUTING.md doc for contribution guidelines.
This software is licensed under MIT.