@bomihooks/use-input
v1.0.1
Published
React Hook to update your document's input
Downloads
1
Readme
@bomihooks/use-input
React Hook to update your document's input Example
import { useInput } from "@bomihooks/use-input";
export default function App() {
const maxLen = (value) => value.length <= 10;
const name = useInput("Mr.", maxLen);
return (
<div className="App">
<h1>Hello</h1>
<input placeholder="Name" {...name} />
</div>
);
}