Update useIsForeground.ts
This commit is contained in:
parent
d3fbf6700e
commit
1f3de955c7
@ -6,7 +6,7 @@ export const useIsForeground = (): boolean => {
|
||||
const [isForeground, setIsForeground] = useCachedState(true);
|
||||
|
||||
useEffect(() => {
|
||||
const onChange = (state: AppStateStatus) => {
|
||||
const onChange = (state: AppStateStatus): void => {
|
||||
setIsForeground(state === 'active');
|
||||
};
|
||||
AppState.addEventListener('change', onChange);
|
||||
|
Loading…
Reference in New Issue
Block a user