There was an error while loading. Please reload this page.
1 parent ac63705 commit a34dc35Copy full SHA for a34dc35
dist/index.js
@@ -7,7 +7,7 @@ export default function useAppState(settings) {
7
8
useEffect(() => {
9
function handleAppStateChange(nextAppState) {
10
- if (nextAppState === 'active') {
+ if (nextAppState === 'active' && appState !== 'active') {
11
isValidFunction(onForeground) && onForeground();
12
} else if (appState === 'active' && nextAppState.match(/inactive|background/)) {
13
isValidFunction(onBackground) && onBackground();
0 commit comments