Tikam Chand
Tikam Chand

Reputation: 96

The value for the promptBeforeIdle property must be less than the timeout property

I'm using the react-idle-timer library to prompt users on idle. This is how I have integrated it.

  const eventsTimer = useIdleTimer({
    element: document,
    startOnMount: false,
    startManually: true,
    name: "events-timer",
    onAction: createPageEvent,
    events: ["click", "mousemove", "keydown", "touchstart", "change", "select", "scroll"],
  });

  // USER ACTIVITY TIMER
  const activityTimer = useIdleTimer({
    crossTab: true,
    syncTimers: 200,
    startOnMount: false,
    startManually: true,
    name: "activity-timer",
    timeout: expireTestTime * 60 * 1000, // in miliseconds
    onIdle: () => sendMsgToBackground({ action: ACTION.USER_ACTIVITY_IDLE }),
  });

It was working fine earlier but recently when I did the npm i to install the required libraries, it stopped working. Now I'm getting the error like The value for the promptBeforeIdle property must be less than the timeout property idletimer.

I'm not using the promptBeforeIdle property but still I'm getting this error. Is there any solution for this?

Upvotes: 1

Views: 697

Answers (0)

Related Questions