How to know if app is in foreground or background in React Native?
React Native provides AppState module which gives information regarding the state of an application. We can know whether app is in foreground or background. This module provides a property currentState…