chore: Upgrade a whole lotta dependencies (#436)
* chore: Upgrade a lot of dependencies for `./` * chore: Upgrade a lot of dependencies for `./example` * chore: Upgrade a lot of dependencies for `./docs` * Use new `EventEmitter` syntax (`.remove()`) * Update Podfile.lock * docs: Use watch mode * docs: Replace all relative links with absolute * Fix all links * Update docusaurus.config.js * Upgrade docusaurus-plugin-typedoc to fix docs build * Update yarn.lock * Upgrade typescript to 4.4.3 * Fix error unknown * Update package.json * Upgrade typedoc * Upgrade a few more deps * Fix deprecated sidebar syntax * Update Gemfile.lock
This commit is contained in:
@@ -9,10 +9,8 @@ export const useIsForeground = (): boolean => {
|
||||
const onChange = (state: AppStateStatus): void => {
|
||||
setIsForeground(state === 'active');
|
||||
};
|
||||
const subscription = AppState.addEventListener('change', onChange);
|
||||
return () => {
|
||||
subscription.remove();
|
||||
};
|
||||
const listener = AppState.addEventListener('change', onChange);
|
||||
return () => listener.remove();
|
||||
}, [setIsForeground]);
|
||||
|
||||
return isForeground;
|
||||
|
||||
Reference in New Issue
Block a user