Skip to content

Commit

Permalink
fix(useIdle): include 'ms' prop in uesEffect dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ManojBahuguna committed Apr 10, 2019
1 parent 49a86a8 commit 7a670a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useIdle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const useIdle = (ms: number = oneMinute, initialState: boolean = false, events:
}
off(document, 'visibilitychange', onVisibility);
};
}, events);
}, [ms, events]);

return state;
};
Expand Down

0 comments on commit 7a670a2

Please sign in to comment.