React sensor hook that determine if the application is in focus or not.
An example of using useHasFocus
hook can be found with the Toast
component.
Trigger the toast and focus on another window. You will notice the track bar is stopping.
Run the following command: