1.0.1 • Published 4 years ago
@dobuzi_hooks/use-input v1.0.1
@dobuzi_hooks/use-input
React hook to use input
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>
);
};