mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 00:32:51 +02:00
Improve event emitter
This commit is contained in:
@@ -49,11 +49,7 @@ export function ServerAccordions(props: IProps): React.ReactElement {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
WorkerScriptStartStopEventEmitter.addSubscriber({
|
||||
cb: rerender,
|
||||
id: subscriberId,
|
||||
});
|
||||
return () => WorkerScriptStartStopEventEmitter.removeSubscriber(subscriberId);
|
||||
return WorkerScriptStartStopEventEmitter.subscribe(rerender);
|
||||
}, []);
|
||||
|
||||
const handleChangePage = (event: unknown, newPage: number) => {
|
||||
|
||||
Reference in New Issue
Block a user