Skip to content

Commit 8ba9bb1

Browse files
committed
update package
1 parent 9a44411 commit 8ba9bb1

File tree

10 files changed

+101
-1630
lines changed

10 files changed

+101
-1630
lines changed

.babelrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@
77
}
88
],
99
"@babel/preset-typescript"
10-
]
10+
],
11+
"plugins": [[
12+
"@babel/plugin-transform-runtime",
13+
{ "useESModules": true }
14+
]]
1115
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ same as https://lodash.com/docs/4.17.11#debounce
1515

1616
```js
1717
import React from 'react';
18-
import { useDebounce } from '@qunhe/react-hooks-collection';
18+
import { useDebounce } from '@qunhe/rhc';
1919

2020
const Com = () => {
2121
const debouncedChange = useDebounce((v) => {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name: useInterval
88

99
```jsx
1010
import React, { useState } from 'react';
11-
import { useInterval } from '@qunhe/react-hooks-collection';
11+
import { useInterval } from '@qunhe/rhc';
1212

1313
const Com = () => {
1414
const [seconds, setSeconds] = useState(0);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dep: https://github.com/streamich/use-media
99

1010
```jsx
1111
import React from 'react';
12-
import { useMediaQuery } from '@qunhe/react-hooks-collection';
12+
import { useMediaQuery } from '@qunhe/rhc';
1313

1414
const Com = () => {
1515
const matches = useMediaQuery('(min-width: 576px)');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function usePromise<Result = any>(promise: Promise<Result> | (() => Promise<Resu
1818

1919
```js
2020
import React from 'react';
21-
import { usePromise } from '@qunhe/react-hooks-collection';
21+
import { usePromise } from '@qunhe/rhc';
2222

2323
function Example() {
2424
const [state, result = 'default value', error] = usePromise(
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ same as https://lodash.com/docs/4.17.11#throttle
1515

1616
```js
1717
import React from 'react';
18-
import { useThrottle } from '@qunhe/react-hooks-collection';
18+
import { useThrottle } from '@qunhe/rhc';
1919

2020
const Com = () => {
2121
const debouncedChange = useThrottle((v) => {

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "react-hooks-common",
2+
"name": "@qunhe/rhc",
33
"version": "0.1.0",
44
"description": "some common react hooks",
55
"main": "lib/index.js",
@@ -22,8 +22,9 @@
2222
"author": "frezc",
2323
"license": "MIT",
2424
"dependencies": {
25+
"@babel/runtime": "^7.3.4",
2526
"react-use-promise": "^0.1.2",
26-
"use-lodash-debounce-throttle": "^0.1.0",
27+
"use-lodash-debounce-throttle": "^0.1.1",
2728
"use-media": "^1.2.0"
2829
},
2930
"peerDependencies": {
@@ -33,12 +34,12 @@
3334
"devDependencies": {
3435
"@babel/cli": "^7.2.3",
3536
"@babel/core": "^7.3.3",
37+
"@babel/plugin-transform-runtime": "^7.3.4",
3638
"@babel/preset-env": "^7.3.1",
3739
"@babel/preset-typescript": "^7.3.3",
3840
"@types/react": "^16.8.3",
3941
"docz": "^0.13.7",
4042
"docz-theme-default": "^0.13.7",
41-
"parcel-bundler": "^1.11.0",
4243
"react": "^16.8.2",
4344
"react-dom": "^16.8.2",
4445
"typescript": "^3.3.3"

readme.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ order: 100
88

99
React hooks collections for common usage.
1010

11+
## Demo
12+
http://manual.k8s-new.qunhequnhe.com/react-hooks-common
13+
1114
## Install
1215
```sh
13-
yarn add react-hooks-common
16+
yarn add @qunhe/rhc
1417
```
1518

1619
Since this module uses React's new [Hooks feature](https://reactjs.org/docs/hooks-intro.html),

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"noImplicitAny": false,
1111
"target": "esnext",
1212
"pretty": true,
13-
"sourceMap": true,
13+
"sourceMap": false,
1414
"allowSyntheticDefaultImports": true,
1515
"esModuleInterop": true,
1616
"outDir": "lib",

0 commit comments

Comments
 (0)