Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rehooks/input-value

React hook for creating input values
https://github.com/rehooks/input-value

forms hooks input react value

Last synced: about 2 months ago
JSON representation

React hook for creating input values

Awesome Lists containing this project

README

        

# `@rehooks/input-value`

> React hook for creating input values

> **Note:** This is using the new [React Hooks API Proposal](https://reactjs.org/docs/hooks-intro.html)
> 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

```sh
yarn add @rehooks/input-value
```

## Usage

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

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