Not able to see OnPrompt is being called. #278
-
I was just testing on how this works, and trying to understand and found the onPrompt function is not being called. ` export default function App() { const onPrompt = () => { const onActive = (event) => { const onAction = (event) => { const { getRemaningTime, isPrompted, getTabId, activate } = useIdleTimer({ return (
); |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Looks like your prompt timeout is 0. That needs to be a positive, non zero number for the onPrompt function to be called. |
Beta Was this translation helpful? Give feedback.
-
I was using old 4.o. IdleTimer and came to know this new 5.0 one. |
Beta Was this translation helpful? Give feedback.
-
Can you link me to that code sandbox. |
Beta Was this translation helpful? Give feedback.
-
Looks like that sandbox is using v4. Prompts only work with v5. |
Beta Was this translation helpful? Give feedback.
Looks like that sandbox is using v4. Prompts only work with v5.