Skip to content

安装

你可以使用自己喜欢的包管理器,从 npm 安装 react-simplikit

sh
npm install react-simplikit
sh
pnpm add react-simplikit
sh
yarn add react-simplikit
sh
bun add react-simplikit

环境要求

  • React 18 或更高版本
  • TypeScript 4.7 或更高版本(推荐)

用法

直接从这个包中导入 Hook:

tsx
import { useKeyboardHeight, useAvoidKeyboard } from 'react-simplikit';

所有 Hook 都支持 tree shaking,因此只有你真正用到的部分才会被打进包里。

基于 MIT 许可证发布。