【文件属性】:
文件名称:input-value:React钩子用于创建输入值
文件大小:64KB
文件格式:ZIP
更新时间:2021-05-06 16:15:56
react hooks input forms value
@rehooks/input-value
React钩子用于创建输入值
注意:这是使用新的,该可能会更改,直到React 16.7最终版本为止。
您需要在^16.7.0-alpha.0处安装react , react-dom等
安装
yarn add @rehooks/input-value
用法
import useInputValue from '@rehooks/input-value' ;
function MyComponent ( ) {
let name = useInputValue ( 'Jamie' ) ;
// name = { value: 'Jamie', onChange: [Function] }
return < input { ... name } / > ;
}
【文件预览】:
input-value-master
----.travis.yml(139B)
----index.js(329B)
----test.js(555B)
----package.json(851B)
----example.html(333B)
----index.js.flow(162B)
----LICENSE(1KB)
----example.js(212B)
----index.d.ts(186B)
----.gitignore(31B)
----README.md(568B)
----yarn.lock(229KB)
----test-setup.js(51B)