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

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

Releases

No releases published

Packages

No packages published

Languages