Skip to content
/ hooks Public

Lightweight, multi-application based React hooks library

License

Notifications You must be signed in to change notification settings

Baoing/hooks

Repository files navigation

Ready to use out of the box, no hassle.


npm package npm downloads demos

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

在这里提供一些示例代码和演示,以帮助用户更好地理解如何使用这些 hooks。

链接地址

其中示例

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

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

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

  useEventListener('click', handleClick);

  return (
    <div>
      <h1>当前窗口大小: {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

Releases

No releases published

Packages

No packages published

Languages