0.1.5 • Published 4 years ago

hooks-react-useforms v0.1.5

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

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} 
            />
        </>
    );
}
0.1.5

4 years ago

0.0.3

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago