Space panel should watch spaces for space name changes (#7432)
This commit is contained in:
@@ -65,6 +65,8 @@ export const useEventEmitterState = <T>(
|
||||
const handler = useCallback((...args: any[]) => {
|
||||
setValue(fn(...args));
|
||||
}, [fn]);
|
||||
// re-run when the emitter changes
|
||||
useEffect(handler, [emitter]); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
useEventEmitter(emitter, eventName, handler);
|
||||
return value;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user