Suppose there 5 pages to a website. User flow will be
1->2->3->4->5->FINISH. I want to implement is that whenever a user enters page 3 a timer starts and if he doesn't finish a task within that time it is redirected to page 2.
I am thinking of implementing it using a
Higher Order Component(HOC) which on mount starts the timer. And warpping up the components of pages 3-4-5 (which are part of the session) with the Higher Order Component created earlier.
Any flaw in my approach considering user can open multiple tabs? Any new suggestion?