bfaulk96 / reactuse

Collection of essential React Hooks Utilities.

Home Page:https://www.reactuse.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reactuse

Bundlephobia Types NPM Version UnLicense

npm i @reactuses/core

Collection of essential React Hooks Utilities.


QuickStart

import { useToggle } from "@reactuses/core";

const Demo = () => {
  const [on, toggle] = useToggle(true);

  return (
    <div>
      <div>{on ? "ON" : "OFF"}</div>
      <button onClick={toggle}>Toggle</button>
      <button onClick={() => toggle(true)}>set ON</button>
      <button onClick={() => toggle(false)}>set OFF</button>
    </div>
  );
};

Refer to documentations for more details.


Documentation & Live Examples


Contribute

See the Contributing Guide


Idea

We want to keep a single hook function as simple as possible.

Thanks

This project is heavily inspired by the following awesome projects.


About

Collection of essential React Hooks Utilities.

https://www.reactuse.com

License:The Unlicense


Languages

Language:TypeScript 87.7%Language:CSS 11.9%Language:HTML 0.3%Language:JavaScript 0.1%