react-idle-timer
Advanced tools
Comparing version
@@ -0,1 +1,6 @@ | ||
### 4.2.1 | ||
- Added a typescript definition that will now be maintained along with this library. It expects that you have the react type definitions installed. | ||
- Fixed a documentation error | ||
# 4.2.0 | ||
@@ -2,0 +7,0 @@ |
18
DOCS.md
@@ -84,3 +84,3 @@ <!-- Generated by documentation.js. Update this documentation by updating the source code. --> | ||
Type: [Boolean][31] | ||
Type: [Number][27] | ||
@@ -92,3 +92,3 @@ ## element | ||
Type: [Object][32] | ||
Type: [Object][31] | ||
@@ -100,3 +100,3 @@ ## startOnMount | ||
Type: [Boolean][31] | ||
Type: [Boolean][32] | ||
@@ -110,3 +110,3 @@ ## stopOnIdle | ||
Type: [Boolean][31] | ||
Type: [Boolean][32] | ||
@@ -118,3 +118,3 @@ ## passive | ||
Type: [Boolean][31] | ||
Type: [Boolean][32] | ||
@@ -126,3 +126,3 @@ ## capture | ||
Type: [Boolean][31] | ||
Type: [Boolean][32] | ||
@@ -168,3 +168,3 @@ ## methods | ||
Returns **[Boolean][31]** | ||
Returns **[Boolean][32]** | ||
@@ -263,4 +263,4 @@ ## utilities | ||
[31]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean | ||
[31]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object | ||
[32]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object | ||
[32]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean |
{ | ||
"name": "react-idle-timer", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "Activity detection for React.js", | ||
"main": "dist/index.min.js", | ||
"module": "dist/index.es.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"build": "rollup -c", | ||
"build": "rollup -c && cp src/index.d.ts dist/index.d.ts", | ||
"watch": "rollup -c -w", | ||
@@ -10,0 +11,0 @@ "clean": "rimraf dist example/src/dist docs coverage", |
@@ -16,6 +16,12 @@ # React Idle Timer | ||
Version `4.1.0` brings two of the most requested features to `IdleTimer`: | ||
Version `4.2.0` brings typescript support and dynamic event binding to `IdleTimer`: | ||
☝️ You can now use `IdleTimer` as a generic activity monitor via the new `onAction` event handler. We recommend using one of the built in `debounce` or `throttle` properties if you dont need every single update. It really improves performance. | ||
☝️ Events will now dynamically unbind when they are not needed (`pause()`, `stopOnIdle`) and bound when they are needed (`resume()`, `reset()`, `startOnMount`). If `onAction` is set, events will never be unbound. | ||
✌️ Added a typescript type definition file that will be maintained alongside this library. It requires that you have the react type definitions installed. | ||
Version `4.1.0` brings two of the most requested features to `IdleTimer`: | ||
☝️ You can now use `IdleTimer` as a generic activity monitor via the new `onAction` event handler. We recommend using one of the built in `debounce` or `throttle` properties if you dont need every single update. It really improves performance. | ||
✌️ Added a property `stopOnIdle` that allows developer intervention between the idle and active states. Good for waiting for an async task to complete before restarting the `IdleTimer`. If this option is set, you will have to call `reset()` manually to restart `IdleTimer`. | ||
@@ -67,3 +73,3 @@ | ||
} | ||
_onActive(e) { | ||
@@ -70,0 +76,0 @@ console.log('user is active', e) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
67671
4.54%10
11.11%137
179.59%133
4.72%