react-idle-timer
Advanced tools
Changelog
5.4.1
createMocks()
.reset
was not resetting the start time affecting getTotalActiveTime()
. #272Changelog
5.4.0
crossTab
is enabled causing bad performance when many tabs are open. #247Changelog
5.3.0
reset
method now respects startManually
property. It will no longer automatically call onActive
.DEFAULT_EVENTS
for easy extension of events. #260getRemainingTime
method now always returns the time to idle instead of time to prompt and then time to idle. #256onAction
callbacks will automatically be cancelled on idle. #255Changelog
5.2.0
name
property to support multiple instances when crossTab
is enabled.Changelog
5.1.3
Omit
over utility-types Subtract
. Fixes missing dependency error.Changelog
5.1.2
withIdleTimer
.Changelog
5.1.1
withIdleTimer
.Changelog
5.1.0
Due to popular request, Leader Election has returned in version 5.1.0. While the old implementation was incompatible with v5, this new implementation is compatible. A new property
leaderElection
is exposed to enable the feature. The major difference between the v4 and v5 implementation is that in v5 events are not isolated to your leader tab automatically. You will need to call theisLeader
method inside your event handlers. See the docs for more information.
Changelog
5.0.0
Version 5 is a complete, from scratch, typescript rewrite. A lot of effort went into this release. If you find this package useful and have the means, please consider a small donation!
immediateEvents
property.withIdleTimer
.IdleTimerProvider
.syncTimers
property.crossTab
from the ground up. The new implementation is much smaller and more efficient.getTotalActiveTime
returning negative value.capture
property.passive
property.emitOnAllTabs
property.isLeader
method.ref
optional in typedef.ref
to TypeScript definitions.onActive
and onIdle
event handlers in conjunction with cross tab event reconciliation.emitOnAllTabs
is set to true
, start
, reset
, pause
and resume
will be called on all tabs.reset
will now automatically fire onActive
while calling start
will not. Otherwise these two methods are functionally equivalent.localStorage
method would not call idle
if there wasn't any user activity on the page.TabManager
would not deregister itself when the tab was closed if it was not the leader tab.