Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 655 Bytes

README.md

File metadata and controls

35 lines (30 loc) · 655 Bytes

Nooks

Collection of React Hooks ready to install with NPM

  • useInput
  • useTabs
  • useTitle
  • useClick
  • useHover
  • useConfirm
  • usePreventLeave
  • useBeforeLeave
  • useFadeIn
  • useNetwork
  • useScroll
  • useFullScreen
  • useNotification
  • useAxios

Usage

import useInput from "@nooks/use-input";

const App = () => {
    const noAt = (value) => !value.includes("@");
    const name = useInput("Mr. ", noAt);
    return (
        <div className="App">
            <h1>Hello</h1>
            <input placeholder="Name" {...name.props} />
        </div>
    );
};