@rehooks/input-value
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

/@rehooks/input-value/

    Package Sidebar

    Install

    npm i @rehooks/input-value

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.13 kB

    Total Files

    6

    Last publish

    Collaborators

    • hanford
    • jmoxey
    • iamsolankiamit
    • fouad
    • mathdroid
    • thejameskyle