fix: excessive autorun calls

This commit is contained in:
Baptiste Grob
2021-04-08 18:48:49 +02:00
parent 87076addad
commit e12b9ecac8
4 changed files with 41 additions and 45 deletions

View File

@@ -5,7 +5,9 @@ import { AppState } from '@/ui_models/app_state';
type Props = { appState: AppState };
function NoAccountWarning({ appState }: Props) {
const canShow = useAutorunValue(() => appState.noAccountWarning.show);
const canShow = useAutorunValue(() => appState.noAccountWarning.show, [
appState,
]);
if (!canShow) {
return null;
}