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
  • 365
  • 4
  • 11

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,032
  • 1
  • 18
  • 18