React 组合了美丽而(希望)有用的React 钩子来加速组件和钩子的开发
[(ZZURL0ZH).
< br /> (韩语)
英文 简体中文</a" 意大利语 <a href='https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.es-ES.md"> 西班牙语 <a href='https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.uk-UA.md"> 乌克兰语 巴西葡萄牙语 <a href='https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.pl-PL.md"> Polski <a href='https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.jp-JP.md"> > <a href='https://github.com/beautifulinteractions/beautiful-react-hooks/blob/master/docs/README.tr-TR.md"> Türkçe
为什么?
自定义的 React 钩子允许开发者将组件的商业逻辑抽象为单一的可再用功能.
我注意到我创造和分享的许多钩子 涉及召回、参考、事件和处理
组件生命周期。 ]
因此,我创建了 " 美丽-React-hooks " ,这是一个有用的[React]钩(https://beta.reactjs.org/reference/react)集合,可能
帮助其他开发者加快开发进程..
此外,我努力创建一个简洁实用的API,强调代码可读性,同时保持学习曲线低至
使用和分享
页:1
** -- 请在使用任何钩子之前,阅读其文件! -** 翻译:
□ * * * * 特点
□ 安装
使用“npm”:
(原始内容存档于2019-09-29) (英语). ```bash $ npm install beautiful-react-hooks
使用`yarn':
ZZ1ZZ
□ 基本用途
导入钩子和以下直线一样简单:
(原始内容存档于2019-09-29). ```ts static
import useSomeHook from 'beautiful-react-hooks/useSomeHook'□ 钩子
useTableParams 钩子
[TypeScript] 钩子不支持 ref 属性中的 null 或 undefined 类型
React Router 漏洞
`useGeolocation` 在 Firefox 桌面版中无法更新状态
useDebouncedCallback 没有考虑其依赖项
正在安装 react-router peer 依赖项
100% 代码覆盖率
useAudioControls 每次更新状态时都返回新的控件对象
废弃所有与 react-router-dom 相关的钩子
自动生成 CHANGELOG.md