Skip to content

React hook for creating input values

License

Notifications You must be signed in to change notification settings

rehooks/input-value

Folders and files

NameName
Last commit message
Last commit date

Latest commit

259fc7a · May 10, 2021

History

6 Commits
Oct 25, 2018
Oct 25, 2018
Oct 25, 2018
Oct 25, 2018
Oct 25, 2018
Oct 25, 2018
Oct 26, 2018
Oct 29, 2018
Oct 25, 2018
Oct 25, 2018
Oct 25, 2018
Oct 25, 2018
May 10, 2021

Repository files navigation

@rehooks/input-value

React hook for creating input values

Note: This is using the new React Hooks API Proposal which is subject to change until React 16.7 final.

You'll need to install react, react-dom, etc at ^16.7.0-alpha.0

Install

yarn add @rehooks/input-value

Usage

import useInputValue from '@rehooks/input-value';

function MyComponent() {
  let name = useInputValue('Jamie');
  // name = { value: 'Jamie', onChange: [Function] }
  return <input {...name}/>;
}