Making an inactive browser tab active again automatically using react js

Im building a react app. in the app, Im receiving a message through an API and if I receive a message, the message automatically display to the user.

But the problem is if the user is on another tab, they cannot see whether a message is received. I want to make the react app tab active immediately if the user is browsing on another tab after receiving a message. Is there a way in react to make the tab automatically active?