Skip to content
Permalink
Browse files

πŸ“ Doc refactorying

  • Loading branch information
antonioru committed Jan 7, 2020
1 parent 8e4d8fa commit 52ea17b0711ab83b7e98ccf6c538d0bb5c8a417b
Showing with 2,246 additions and 2,392 deletions.
  1. +1 βˆ’1 .eslintignore
  2. +1 βˆ’1 .gitignore
  3. +2 βˆ’1 .travis.yml
  4. +11 βˆ’3 CHANGELOG.md
  5. +49 βˆ’0 HOOK_DOCUMENTATION_TEMPLATE.md
  6. +43 βˆ’20 README.md
  7. +0 βˆ’2 dist-ghpages/build/bundle.33d845dc.js
  8. +2 βˆ’0 dist-ghpages/build/bundle.f7b859da.js
  9. dist-ghpages/build/{bundle.33d845dc.js.LICENSE β†’ bundle.f7b859da.js.LICENSE}
  10. +2 βˆ’2 dist-ghpages/index.html
  11. +6 βˆ’6 dist/index.js
  12. +1 βˆ’1 dist/index.js.map
  13. +1 βˆ’0 dist/useCallbackRef.js
  14. +1 βˆ’1 dist/useCallbackRef.js.map
  15. +0 βˆ’22 dist/useDebouncedCallback.js
  16. +0 βˆ’1 dist/useDebouncedCallback.js.map
  17. +29 βˆ’0 dist/useDebouncedFn.js
  18. +1 βˆ’0 dist/useDebouncedFn.js.map
  19. +2 βˆ’2 dist/useDidMount.js
  20. +1 βˆ’1 dist/useDidMount.js.map
  21. +1 βˆ’1 dist/useGeolocation.js.map
  22. +1 βˆ’1 dist/useGeolocationEvents.js.map
  23. +1 βˆ’1 dist/useGeolocationState.js.map
  24. +21 βˆ’4 dist/useGlobalEvent.js
  25. +1 βˆ’1 dist/useGlobalEvent.js.map
  26. +43 βˆ’19 dist/useInterval.js
  27. +1 βˆ’1 dist/useInterval.js.map
  28. +3 βˆ’3 dist/useLifecycle.js
  29. +1 βˆ’1 dist/useLifecycle.js.map
  30. +1 βˆ’1 dist/useMediaQuery.js.map
  31. +1 βˆ’1 dist/useMouse.js.map
  32. +1 βˆ’1 dist/useMouseEvents.js.map
  33. +1 βˆ’1 dist/useMouseState.js.map
  34. +1 βˆ’1 dist/usePrev.js.map
  35. +0 βˆ’22 dist/useThrottledCallback.js
  36. +0 βˆ’1 dist/useThrottledCallback.js.map
  37. +29 βˆ’0 dist/useThrottledFn.js
  38. +1 βˆ’0 dist/useThrottledFn.js.map
  39. +31 βˆ’41 dist/useTimeout.js
  40. +1 βˆ’1 dist/useTimeout.js.map
  41. +2 βˆ’2 dist/useWillUnmount.js
  42. +1 βˆ’1 dist/useWillUnmount.js.map
  43. +2 βˆ’2 dist/useWindowResize.js
  44. +1 βˆ’1 dist/useWindowResize.js.map
  45. +2 βˆ’2 dist/useWindowScroll.js
  46. +1 βˆ’1 dist/useWindowScroll.js.map
  47. +0 βˆ’30 dist/utils/debounce.js
  48. +0 βˆ’1 dist/utils/debounce.js.map
  49. +0 βˆ’30 dist/utils/throttle.js
  50. +0 βˆ’1 dist/utils/throttle.js.map
  51. +28 βˆ’0 docs/styleguidist/CustomLogo.js
  52. BIN docs/styleguidist/doc-logo.png
  53. +12 βˆ’0 docs/styleguidist/setup.js
  54. +9 βˆ’3 {playground/config β†’ docs/styleguidist}/styleguidist.config.js
  55. +22 βˆ’2 {playground/config β†’ docs/styleguidist}/styleguidist.theme.js
  56. +5 βˆ’1 {playground/config β†’ docs/styleguidist}/webpack.config.js
  57. +12 βˆ’14 docs/useCallbackRef.md
  58. +0 βˆ’61 docs/useDebouncedCallback.md
  59. +127 βˆ’0 docs/useDebouncedFn.md
  60. +81 βˆ’10 docs/useDidMount.md
  61. +79 βˆ’23 docs/useGeolocation.md
  62. +32 βˆ’9 docs/useGeolocationEvents.md
  63. +62 βˆ’14 docs/useGeolocationState.md
  64. +92 βˆ’15 docs/useGlobalEvent.md
  65. +96 βˆ’26 docs/useInterval.md
  66. +89 βˆ’12 docs/useLifecycle.md
  67. +32 βˆ’16 docs/useMediaQuery.md
  68. +83 βˆ’30 docs/useMouse.md
  69. +72 βˆ’38 docs/useMouseEvents.md
  70. +53 βˆ’27 docs/useMouseState.md
  71. +23 βˆ’20 docs/usePrev.md
  72. +0 βˆ’61 docs/useThrottledCallback.md
  73. +126 βˆ’0 docs/useThrottledFn.md
  74. +103 βˆ’4 docs/useTimeout.md
  75. +70 βˆ’10 docs/useWillUnmount.md
  76. +101 βˆ’11 docs/useWindowResize.md
  77. +93 βˆ’11 docs/useWindowScroll.md
  78. +112 βˆ’51 index.d.ts
  79. +39 βˆ’20 package-lock.json
  80. +9 βˆ’10 package.json
  81. +0 βˆ’51 playground/useCallbackRef.md
  82. +0 βˆ’37 playground/useDebouncedCallback.md
  83. +0 βˆ’42 playground/useDidMount.md
  84. +0 βˆ’36 playground/useGeolocation.md
  85. +0 βˆ’37 playground/useGeolocationEvents.md
  86. +0 βˆ’59 playground/useGeolocationState.md
  87. +0 βˆ’33 playground/useGlobalEvent.md
  88. +0 βˆ’47 playground/useInterval.md
  89. +0 βˆ’46 playground/useLifecycle.md
  90. +0 βˆ’29 playground/useMediaQuery.md
  91. +0 βˆ’36 playground/useMouse.md
  92. +0 βˆ’68 playground/useMouseEvents.md
  93. +0 βˆ’51 playground/useMouseState.md
  94. +0 βˆ’35 playground/usePrev.md
  95. +0 βˆ’37 playground/useThrottledCallback.md
  96. +0 βˆ’148 playground/useTimeout.md
  97. +0 βˆ’34 playground/useWillUnmount.md
  98. +0 βˆ’37 playground/useWindowResize.md
  99. +0 βˆ’34 playground/useWindowScroll.md
  100. +0 βˆ’27 scripts/generateDocs.js
  101. +2 βˆ’2 src/index.js
  102. +1 βˆ’35 src/useCallbackRef.js
  103. +0 βˆ’64 src/useDebouncedCallback.js
  104. +21 βˆ’0 src/useDebouncedFn.js
  105. +6 βˆ’6 src/{useDebouncedCallback.spec.js β†’ useDebouncedFn.spec.js}
  106. +3 βˆ’15 src/useDidMount.js
  107. +0 βˆ’23 src/useGeolocation.js
  108. +0 βˆ’22 src/useGeolocationEvents.js
  109. +0 βˆ’19 src/useGeolocationState.js
  110. +12 βˆ’24 src/useGlobalEvent.js
  111. +40 βˆ’42 src/useInterval.js
  112. +68 βˆ’12 src/useInterval.spec.js
  113. +3 βˆ’16 src/useLifecycle.js
  114. +0 βˆ’15 src/useMediaQuery.js
  115. +0 βˆ’40 src/useMouse.js
  116. +0 βˆ’55 src/useMouseEvents.js
  117. +2 βˆ’35 src/useMouseState.js
  118. +0 βˆ’21 src/usePrev.js
  119. +0 βˆ’64 src/useThrottledCallback.js
  120. +20 βˆ’0 src/useThrottledFn.js
  121. +6 βˆ’6 src/{useThrottledCallback.spec.js β†’ useThrottledFn.spec.js}
  122. +31 βˆ’32 src/useTimeout.js
  123. +53 βˆ’25 src/useTimeout.spec.js
  124. +2 βˆ’14 src/useWillUnmount.js
  125. +2 βˆ’15 src/useWindowResize.js
  126. +1 βˆ’14 src/useWindowScroll.js
  127. +0 βˆ’18 src/utils/debounce.js
  128. +0 βˆ’33 src/utils/debounce.spec.js
  129. +0 βˆ’19 src/utils/throttle.js
  130. +0 βˆ’37 src/utils/throttle.spec.js
@@ -1,5 +1,5 @@
/dist
/docs
/test
/playground
/docs
index.d.ts
@@ -123,7 +123,7 @@ ehthumbs_vista.db
# Dump file
*.stackdump

# Folder config file
# Folder styleguidist file
[Dd]esktop.ini

# Recycle Bin used on file shares
@@ -7,7 +7,8 @@ install:
- npm ci

script:
- npm test
- npm run lint
- npm run test
- npm run build

deploy:
@@ -30,7 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- useDebouncedCallback hook & tests
- useDebouncedFn hook & tests

## [0.3.0] - 2019-12-21

@@ -70,7 +70,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- useThrottledCallback hook & tests
- useThrottledFn hook & tests
- debounce and throttle utilities

## [0.7.0] - 2019-12-24
@@ -217,4 +217,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- useTimeout
- useTimeout refactory

## [0.13.6] - 2020-01-07

### Fixed

- few hooks refactory
- Improved documentation by a better use of Styleguidist
- Improved types
@@ -0,0 +1,49 @@
# useYourHookName

-- A short description of your hook --

### πŸ’‘ Why?

- why this hook is necessary and what it does

### Basic Usage:

```jsx harmony
import { yourHook } from 'beautiful-react-hooks';
const YourExample = () => {
/* Your code goes here */
return null;
};
<YourExample />
```

### Use cases

description of the use case

```jsx harmony
import { yourHook } from 'beautiful-react-hooks';
const YourUseCase = () => {
/* Your code goes here */
return null;
};
<YourUseCase />
```

### Mastering the hooks

#### βœ… When to use

- When it's good to use

#### πŸ›‘ When not to use

- When it's not good to use
@@ -50,7 +50,7 @@ to keep the learning curve as lower as possible so that the it can be used and s
## πŸ•Ί Install
by using `npm`:
```js
```js s
$ npm install beautiful-react-hooks
```
@@ -62,19 +62,19 @@ $ yarn add beautiful-react-hooks
## 🎨 Hooks
* [useGlobalEvent](./docs/useGlobalEvent.md)
* [usePrev](./docs/usePrev.md)
* [useMediaQuery](./docs/useMediaQuery.md)
* [useGeolocation](./docs/useGeolocation.md), [useGeolocationState](./docs/useGeolocationState.md) and [useGeolocationEvents](./docs/useGeolocationEvents.md)
* [useMouse](./docs/useMouse.md), [useMouseState](./docs/useMouseState.md) and [useMouseEvents](./docs/useMouseEvents.md)
* [useLifecycle](./docs/useLifecycle.md), [useDidMount](./docs/useDidMount.md) and [useWillUnmount](./docs/useWillUnmount.md)
* [useCallbackRef](./docs/useCallbackRef.md)
* [useWindowResize](./docs/useWindowResize.md)
* [useWindowScroll](./docs/useWindowScroll.md)
* [useTimeout](./playground/useTimeout.md)
* [useInterval](./docs/useInterval.md)
* [useDebouncedCallback](./docs/useDebouncedCallback.md)
* [useThrottledCallback](./docs/useThrottledCallback.md)
* [useGlobalEvent](docs/useGlobalEvent.md)
* [usePrev](docs/usePrev.md)
* [useMediaQuery](docs/useMediaQuery.md)
* [useGeolocation](docs/useGeolocation.md), [useGeolocationState](docs/useGeolocationState.md) and [useGeolocationEvents](docs/useGeolocationEvents.md)
* [useMouse](docs/useMouse.md), [useMouseState](docs/useMouseState.md) and [useMouseEvents](docs/useMouseEvents.md)
* [useLifecycle](docs/useLifecycle.md), [useDidMount](docs/useDidMount.md) and [useWillUnmount](docs/useWillUnmount.md)
* [useCallbackRef](docs/useCallbackRef.md)
* [useWindowResize](docs/useWindowResize.md)
* [useWindowScroll](docs/useWindowScroll.md)
* [useTimeout](docs/useTimeout.md)
* [useInterval](docs/useInterval.md)
* [useDebouncedFn](docs/useDebouncedCallback.md)
* [useThrottledFn](docs/useThrottledCallback.md)
<div>
<p align="center">
@@ -84,21 +84,44 @@ $ yarn add beautiful-react-hooks
</p>
</div>
## Contributing
Contributions are very welcome and wanted.
## :arrow_up: contributors/translators wanted
To submit your custom hook, please make sure your read our [CONTRIBUTING](./CONTRIBUTING.md) guidelines.
`beautiful-react-hooks` is looking for contributors and translators, please feel free to join us after reading our [contributing guidlines](./CONTRIBUTING.md) :fire:
**Before submitting** a new merge request, please make sure:
---
1. You have updated the package.json version and reported your changed into the [CHANGELOG](./CHANGELOG.md) file
3. make sure you run `npm test` and `npm build` before submitting your merge request.
4. make sure you've added the documentation of your custom hook (*you can possibly use the [HOOK_DOCUMENTATION_TEMPLATE](./HOOK_DOCUMENTATION_TEMPLATE) to document your custom hook*).
5. make sure you've updated the `index.d.ts` file with your hook types.
##### Tested with
### Made with
* [React](https://reactjs.org/)
* [Mocha](https://mochajs.org/)
* [Chai](https://www.chaijs.com/)
* [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro)
* [@testing-library/react-hooks](https://react-hooks-testing-library.com/)
##### Credits
<small>Icon made by [Freepik](https://www.flaticon.com/authors/freepik) from [www.flaticon.com](https://www.flaticon.com/free-icon/hook_1081812)</small>
### Credits
This library is provided and sponsored by:
<div>
<p>
<a href="https://beautifulinteractions.com/">
<img src="https://beautifulinteractions.com/img/logo-colorful.svg" alt="Beautiful interactions" width="140px" />
</a>
</p>
</div>
As part of our commitment to support and provide the open source community.
---
<div>
<small>Icon made by [Freepik](https://www.flaticon.com/authors/freepik) from [www.flaticon.com](https://www.flaticon.com/free-icon/hook_1081812)</small>
</div>

This file was deleted.

Large diffs are not rendered by default.

@@ -14,6 +14,15 @@ object-assign
@license MIT
*/

/** @license React v16.12.0
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
@@ -31,15 +40,6 @@ object-assign
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.12.0
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v0.18.0
* scheduler.production.min.js
*
@@ -4,11 +4,11 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>beautiful react hooks playground</title>
<title>beautiful react hooks docs</title>
<link rel="icon" type="image/x-icon" href="https://beautifulinteractions.com/favicons/bi-favicon.ico">
</head>
<body>
<div id="rsg-root"></div>
<script src="build/bundle.33d845dc.js"></script>
<script src="build/bundle.f7b859da.js"></script>
</body>
</html>

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

This file was deleted.

This file was deleted.

0 comments on commit 52ea17b

Please sign in to comment.
You can’t perform that action at this time.