npm.io
0.0.3 • Published 5 years ago

4leaf-hooks-useinput

Licence
MIT
Version
0.0.3
Deps
0
Size
2 kB
Vulns
0
Weekly
0

4leaf-hooks-useinput

React Hooks to realtime change input value

installation

  • yarn

     yarn add 4leaf-hooks-useinput
    
  • npm

     npm install 4leaf-hooks-useinput
    

Usage

import React from "react";
import useInput from "4leaf-hooks-useinput";

const App = () => {

  const formId = useInput(``);

  // If you change the value
  formId.setValue("New Value Here!");

  return <form>
    <div>
        <label> ID </label>
        <input type="text" {...formId}/>
    </div>
  <form>
  ;
}

Arguments

Argument Type Description Required
String String Auto Setting Value and onChange with setValue YES

Keywords