@yeong-g/useform
v1.0.2
Published
Make React forms Easy
Downloads
2
Readme
useInput
import
import { useInput } from 'react';
API
const [state, setStateFunc, changeFunc] = useInput("initialValue");
const App = () => {
const [id, setId, changeId] = useInput("");
const [password, setPassword, changePassword] = useInput("");
return (
<>
<input
type="text"
name="id"
value={id}
onChange={changeId}
/>
<input
type="password"
name="password"
value={password}
onChange={changePassword}
/>
</>
);
}