@loyhooks/use-input

1.0.0 • Public • Published

Usage

import useInput from "@nooks/use-input"

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

Package Sidebar

Install

npm i @loyhooks/use-input

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

1.45 kB

Total Files

4

Last publish

Collaborators

  • loy124