@junipero/hooks
TypeScript icon, indicating that this package has built-in type declarations

3.6.0ย โ€ขย Publicย โ€ขย Published

npm

@junipero/hooks

Custom React hooks we use everywhere

Installation

yarn add @junipero/hooks

Usage

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 />;
};

Documentation

https://junipero.design/components/use-event-listener

Contributing

Please check the CONTRIBUTING.md doc for contribution guidelines.

License

This software is licensed under MIT.

Readme

Keywords

none

Package Sidebar

Install

npm i @junipero/hooks

Weekly Downloads

465

Version

3.6.0

License

MIT

Unpacked Size

47.8 kB

Total Files

19

Last publish

Collaborators

  • ugo.poool