use-input-react
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

useInput

Simple hook to avoid re-writting onChange handler for input again and again..

Usage

 $ yarn add use-input-react
import useInput from 'use-input-react';
 
const App = () => {
  const { value, handleChange } = useInput('');
 
  return <input value={value} onChange={handleChange} />;
};
 
export default App;

Package Sidebar

Install

npm i use-input-react

Weekly Downloads

1

Version

2.0.1

License

MIT

Unpacked Size

5.63 kB

Total Files

14

Last publish

Collaborators

  • user93