• Stars
    star
    1,013
  • Rank 45,397 (Top 0.9 %)
  • Language
    TypeScript
  • License
    The Unlicense
  • Created over 5 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

中文文档@react-use



👍
react-use





npm package CircleCI master npm downloads demos
必不可少的 React Hooks集合. 移植 libreact.
原仓库: react-use 版本: v8.1.3




npm i react-use





Usage

你需要安装React 16.8.0或更高版本才能使用Hooks API。你可以分别导入每个钩子

import useToggle from 'react-use/lib/useToggle'

或使用 ES6 命名导入

import {useToggle} from 'react-use'

根据绑定器的不同,你可能会在ES6命名导入语句中遇到缺少依赖项的错误。有些钩子要求安装对等依赖项,因此我们建议单独导入。如果你希望同时使用这两种方法,你可以通过将以下配置添加到.babelrc文件中,将命名的导入语句转换为使用babel-plugin-import的单个导入语句。

[
  "import", {
    "libraryName": "react-use",
    "libraryDirectory": "lib",
    "camel2DashComponentName": false
  }
]

许可证

Unlicense — 公有领域

More Repositories

1

PPet

👻在你的桌面放一个萌妹子,多一点乐趣😏~(支持Mac、Win和Linux)
TypeScript
1,868
star
2

Mob

Mob - 一个有颜值的喜马拉雅桌面客户端,支持 Mac、Win 和 Linux
TypeScript
965
star
3

Remu

💥Chrome Extension for GitHub that view stars / star history / organizing starred repository
TypeScript
513
star
4

vscode-asciiflow2

Asciiflow in VS Code
JavaScript
395
star
5

saladict-desktop

✨✨桌面划词与翻译工具,聚合了 N 多词典,功能强大,支持 Windows 、 Mac 和 Linux。
JavaScript
386
star
6

GitHub-Pro

一个简洁、强大的 GitHub 小程序客户端,基于 Taro3
TypeScript
145
star
7

general-news-extractor-js

🤔一个新闻网页正文通用抽取器,包括标题、作者和日期。
TypeScript
66
star
8

blog

Person blog
TypeScript
63
star
9

bing-wallpaper

A RESTful API for Bing wallpaper to use easy.
TypeScript
59
star
10

live2d-model-assets

JavaScript
53
star
11

clone-with-vscode

A Chrome Extension to improve efficiency.
JavaScript
30
star
12

multi-vscode-opener

A command line tool to open VSCode with stand-alone user data and extensions.
TypeScript
11
star
13

electron-starter

TypeScript
8
star
14

JavaScript_Practice

JS练习
HTML
6
star
15

leetcode-with-javascript

用 JavaScript 解决 LeetCode 的题目
JavaScript
6
star
16

PPet-Api

PPet Api
JavaScript
6
star
17

django-vue-boilerplate

🔥为前端开发者打造的Vue和Django(RestFramework)模板
Vue
3
star
18

source-map-viewer

[Online] View the source code for the line and column number.
TypeScript
3
star
19

Valentine-s-Day-for-my-GF

情人节纪念礼物(仅适配手机端)
CSS
2
star
20

tu-blog

💥 A blog platform built with koa2.5, vue2.5 and react16.4
JavaScript
2
star
21

zenghongtu.github.io

TypeScript
2
star
22

next-validator

TypeScript
1
star
23

github-issue-to-hexo

aciont for github issue to hexo
TypeScript
1
star
24

progress-x

☕️A progress bar on the menu bar. Inspired by ProgressBarOSX
JavaScript
1
star
25

react-config-router-webpack-plugin

A plugin for react-config-router to generate router config
JavaScript
1
star
26

zenghongtu

1
star
27

url-convert

TypeScript
1
star
28

30-seconds-of-code-zh_cn

JavaScript
1
star