Unable to Pause Timer Using useIdleTimer Hook Inside Component #391
Closed
FernandoVelcic
started this conversation in
General
Replies: 1 comment 1 reply
-
I think you want to use the provider. https://idletimer.dev/docs/api/idle-timer-provider |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I have initialized the useIdleTimer in my React App.js and I would like to know if it's possible to access the pause and resume methods inside of a very deep component. I tried to do it by using the useIdleTimer hook again, but I couldn't pause the timer of my app. It seems like I'm recreating another instance of the idleTimer instead of reusing the already created in my App.js
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions