@yeong-g/useform

1.0.2 • Public • Published

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

/@yeong-g/useform/

    Package Sidebar

    Install

    npm i @yeong-g/useform

    Weekly Downloads

    0

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    2.66 kB

    Total Files

    3

    Last publish

    Collaborators

    • yeong-g