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:
parent
f6fb6f72f4
commit
74173771e4
|
@ -42,7 +42,7 @@ export function RadioToggler() {
|
|||
onWSMessage(lastJsonMessage);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, [lastJsonMessage]);
|
||||
|
||||
let buttonStatus = "";
|
||||
let circleStyle = styles.circleDisconnected;
|
||||
|
|
Loading…
Reference in New Issue
Block a user