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

0.2.50 • Public • Published

Ready to use out of the box, no hassle.


npm package npm downloads demos

English | 简体中文

Installation

$ npm i @channelwill/hooks
# or
$ yarn add @channelwill/hooks
# or
$ pnpm add @channelwill/hooks

API Documentation

See https://hooks.baoea.com/

Tool Hooks

Base Hooks

DOM Hooks

Demo

Here are some sample codes and demonstrations to help users better understand how to use these hooks.

Link address

Examples

import {useWindowSize, useEventListener} from '@channelwill/hooks';

const ExampleComponent = () => {
  const {width, height} = useWindowSize();

  const handleClick = () => {
    console.log('Window clicked!');
  };

  useEventListener('click', handleClick);

  return (
    <div>
      <h1>Current window size: {width} x {height}</h1>
    </div>
  );
};

🤝 Participate in co-construction.

$ git clone git@github.com:Baoing/hooks.git

$ cd hooks

$ npm install

$ npm run start

Open browser access http://localhost:6006/

License

MIT License

Package Sidebar

Install

npm i @channelwill/hooks

Weekly Downloads

308

Version

0.2.50

License

ISC

Unpacked Size

113 kB

Total Files

124

Last publish

Collaborators

  • hubaoqing