Closed sivakannan closed 1 year ago
If you call start
when the hook mounts the isIdle
state will toggle to false
. I will consider changing the default to false in the next release.
If you call
start
when the hook mounts theisIdle
state will toggle tofalse
. I will consider changing the default to false in the next release.
thanks for your quick response. do you have any suggestion to fix(isIdle = false) in meanwhile ?
` const {start, isIdle} = useIdleTimer({'startOnMount': false, 'startManually': true});
useEffect(() => { start(); },[start])
//first time false, second time when it start it return true return { isIdle } `
Idle will default to false
with version 5.5.0
. Should have it published this week!
When are we planning for the release? just to plan. @SupremeTechnopriest
I'm just getting over being sick. It kind of put a damper on my plans. I'm gonna work on the release this week and hopefully have it out next by the end of the week.
@SupremeTechnopriest thanks. Hope you feel better now.
https://github.com/SupremeTechnopriest/react-idle-timer/blob/d343d4d189dffe46c86dcc07b863da19cc98409a/src/useIdleTimer.tsx#L59
I am creating react-idle-timer as utility, my utility will return isIdle. Based on that we are showing popup in frontend. However we are receiving isIdle=true and after some point of time when timer started, we are receiving isIdle=false.
we need isIdle=false as default value. kindly suggest.