Fix ui bug

useEffect must be used carrefully, subscribing the effect to only those
dependencies we are interested to. Otherwise, every re-render will
trigger it.
This commit is contained in:
sfigato 2023-03-07 23:28:31 +01:00
parent f6fb6f72f4
commit 74173771e4
Signed by: blallo
GPG Key ID: C530464EEDCF489A

View File

@ -42,7 +42,7 @@ export function RadioToggler() {
onWSMessage(lastJsonMessage);
}
}
});
}, [lastJsonMessage]);
let buttonStatus = "";
let circleStyle = styles.circleDisconnected;