0

I am trying to call a function to authorize a user when it comes back from a different tab or opens the browser which is minimized. How can I do this in react js app?

Mohammad Quadri
  • 375
  • 4
  • 12

1 Answers1

0

You can use document.hasFocus function. It is native and works and all browsers.

You can see in this example

aquilesb
  • 2,182
  • 1
  • 19
  • 19