1.1.50 • Published 10 months ago

@cannonui/reacthooks v1.1.50

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

Cannon React Hooks

License npm version

Cannon React Hooks is a collection of useful custom hooks for React applications. It provides a set of reusable hooks that solve common problems and enhance the functionality of your React components.

Features

  • useDebounce: A hook for debouncing the value of an input field.

And many more will be available soon!

Installation

Install the package using npm:

npm install @cannonui/reacthooks

Usage

Here's how you can use the hook from this library:

import { useState } from "react";
import { useDebounce } from "@cannonui/reacthooks";

const TestUseDebounce = () => {
  const [inputValue, setInputValue] = useState("");

  const debouncedValue = useDebounce(inputValue, 1000);

  const handleChange = (e: any) => {
    setInputValue(e.target.value);
  };

  return (
    <div>
      <input type="text" value={inputValue} onChange={handleChange} />
      <p>Debounced value: {debouncedValue}</p>
    </div>
  );
};

export default TestUseDebounce;

Contributing

Contributions are welcome! If you have any bug reports, feature requests, or suggestions, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

1.1.50

10 months ago

1.1.39

10 months ago

1.1.36

10 months ago

1.1.32

10 months ago

1.1.31

10 months ago

1.0.30

10 months ago

1.0.26

10 months ago

1.0.16

10 months ago

1.0.12

10 months ago

1.0.6

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.0

10 months ago

0.9.9

10 months ago

0.9.8

10 months ago

0.9.7

10 months ago

0.9.6

10 months ago

0.9.3

10 months ago

0.9.2

10 months ago

0.9.1

10 months ago

0.9.0

10 months ago

0.8.8

10 months ago

0.8.6

10 months ago

0.8.1

10 months ago

0.8.0

10 months ago

0.6.0

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago